Call by Value & Call By Reference In C: C Tutorial In Hindi #31

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ก.ย. 2024

ความคิดเห็น • 740

  • @rajivdwivedi6353
    @rajivdwivedi6353 3 ปีที่แล้ว +338

    Harry while explaining Rocket Science: Isme koi rocket science nahin hai!

  • @athuislive4917
    @athuislive4917 ปีที่แล้ว +1

    #include
    int adder(int *a , int *b){
    // call by refrence means we change the value of the values by taking their adress and modifying them .
    int temp = *a ;
    *a = *a + *b ;
    *b = temp - *b ;
    }
    int main(void) {
    int a =6 ,b = 4;
    printf("The value of a is : %d
    And Value of b is : %d
    " , a ,b);
    adder(&a , &b);
    printf("Changed value of a is : %d
    And Changed Value of b is : %d
    " , a ,b);
    return 0;
    }

  • @GOATSOFFOOTBALL
    @GOATSOFFOOTBALL ปีที่แล้ว +2

    #include
    void fun(int *a,int *b)
    {

    int temp;
    temp=*a;
    *a=(*a+*b);
    *b=(temp-*b);
    }
    int main()
    {
    int a,b;
    printf("enter the values of a and b: ");
    scanf("%d%d",&a,&b);
    fun(&a,&b);
    printf("the value of a is %d and b is %d",a,b);
    }
    thanks bhaiya for teaching this concept so easily to make us understand

  • @AnkitSingh-mh7ee
    @AnkitSingh-mh7ee 2 ปีที่แล้ว +1

    Herry bhai your way of explaining the actual perameter and formal perameter is really superb .

  • @snace_gaming
    @snace_gaming ปีที่แล้ว +1

    #include
    int sum(int a, int b);
    int main()
    {
    int a,b;
    a=4;
    b=3;

    printf("the sum is %d
    ", a+b);
    printf("the mines is %d
    ", a-b);
    return 0;
    }
    int sum(int a, int b)
    {
    return a+b;
    }

  • @atifmalik8012
    @atifmalik8012 7 หลายเดือนก่อน

    Thanks harry bhai mere college ke assignment me tha ye question
    #include
    int interchange(int *x,int*y){
    int z;
    z = *x; //stores num1 value in another variable
    *x = *y; //stores num2 value in num1
    *y = z; // stores num1 value in num2
    }
    int main(){
    int a,b;
    printf("Enter the value of num1 :
    ");
    scanf("%d",&a);
    printf("Enter the value of num2 :
    ");
    scanf("%d",&b);
    printf("num1 = %d
    num2 = %d
    ",a,b);
    interchange(&a,&b);
    printf("After interchanging
    ");
    printf("num1 = %d
    num2 = %d
    ",a,b);
    }

  • @atifmalik8012
    @atifmalik8012 7 หลายเดือนก่อน

    Call by reference example in this i changed actual value of x and y by using pointer
    #include
    float func1(float *a,float *b){
    *a = 1.6;
    *b = 1.0;
    }
    int main(){
    float x = 12.0,y=6.0;
    printf(" x before calling %f
    y before calling %f
    ",x,y);
    float d = func1(&x,&y);
    printf(" x after calling %f
    y after calling %f
    ",x,y);
    }

  • @Riya-js7im
    @Riya-js7im 3 หลายเดือนก่อน +1

    Thank you so much sir😊

  • @rishikumar-uf7tu
    @rishikumar-uf7tu 3 หลายเดือนก่อน +1

    25:31 very important quiz

  • @deepeshrathod2044
    @deepeshrathod2044 4 ปีที่แล้ว +4

    challange accepted
    #include
    void func(int *a,int *b){
    int temp1 = *a+*b;
    int temp2 = *a-*b;
    printf("The values after execution are : %d, %d
    ",temp1 ,temp2);
    }
    int main(){
    int a,b;
    printf("Enter first no.
    ");
    scanf("%d",&a);
    printf("Enter second no.
    ");
    scanf("%d",&b);
    printf("The values of before execution are : %d, %d
    ", a, b);
    func(&a,&b);
    }

    • @rajpatel-yd3ow
      @rajpatel-yd3ow 2 ปีที่แล้ว

      Good

    • @022jayanath3
      @022jayanath3 2 ปีที่แล้ว

      its absolutely wrong bro ..if you print the values of a and b it should be 7 and 1,,,whereas u are printing temp1 and temp2....the actual arguments a,b should be changed ,,,

  • @amrendrashekhar7523
    @amrendrashekhar7523 4 ปีที่แล้ว +2

    all clear and challenge accepted

  • @learncoding6832
    @learncoding6832 ปีที่แล้ว

    smjh toh ache se aa rha bs 2din baad concept ke sath sath example bhi bhul jaa rha hu ab mai iska koi solutuion bta do

  • @RaghurajSinghvlogMViews
    @RaghurajSinghvlogMViews ปีที่แล้ว +1

    Great sir 🎉🎉🎉🎉❤❤❤❤

  • @Rohit_Kumar_Gupta
    @Rohit_Kumar_Gupta ปีที่แล้ว +1

    Challenge💪
    #include
    void as(int *a, int *b) {
    int add = *a + *b;
    int sub = *a - *b;
    *a = add;
    *b = sub;
    }
    int main() {
    int num1, num2;
    printf("Enter two numbers: ");
    scanf("%d %d", &num1, &num2);
    as(&num1, &num2);
    printf("add= %d
    ", num1);
    printf("sub= %d
    ", num2);
    return 0;
    }

  • @tapansonak1431
    @tapansonak1431 3 ปีที่แล้ว +1

    Thanks a lot bhaiya, your teaching skills are off the charts.

  • @anujjadhav2175
    @anujjadhav2175 3 ปีที่แล้ว +1

    I Love The Way you EXPLAIN!!!!!

  • @deependrakumarrout4172
    @deependrakumarrout4172 4 ปีที่แล้ว

    Thanks you so much bhai because of you i am far away from my college c programming once again thank you so much or ye raha program :-
    #include
    int sum(int *num1, int *num2)
    {
    return *num1+*num2;
    }
    int sub(int *num1, int *num2)
    {
    return *num1-*num2;
    }
    int main()
    {
    int a,b;
    printf("Enter a number :");
    scanf("%d",&a);
    printf("Enter another number : ");
    scanf("%d",&b);
    printf("The sum(+) of %d and %d is %d
    ",a,b,sum(&a,&b));
    printf("The sub(-) of %d and %d is %d
    ",a,b,sub(&a,&b));
    return 0;
    }

  • @goharrahman09
    @goharrahman09 5 ปีที่แล้ว +3

    hello sir me na c programming coures ap se shero keya hai lakin installation me kuch samj me nahi aya ab ne jess tara hello word program lika hai me isaye tara na hai lek sakta hu buhat differenc hai apke aur mera programm writting me plzz help me

  • @rajdulari_tadwal4912
    @rajdulari_tadwal4912 3 ปีที่แล้ว

    Thnx it for making it so simple to understand.i couldn't understand it before.

  • @vikashtyagi7286
    @vikashtyagi7286 ปีที่แล้ว +1

    Challenge accepted
    #include
    int challenge (int *x,int *y);
    int main()
    {
    int a=10,b=7;
    printf("The value of a : %d
    ",a);
    printf("The value of b : %d
    ",b);
    challenge (&a,&b);
    printf("
    The value of a : %d
    ",a);
    printf("
    The value of b : %d
    ",b);
    return 0;
    }
    int challenge (int *x,int *y){
    int temp = *x;
    *x = *x+*y;
    *y = temp - (*y);
    return 0;
    }

  • @mampilahiri3441
    @mampilahiri3441 7 หลายเดือนก่อน

    Excuse me harry bhaiya can u bring a video of the same in java

  • @utsavjasani1771
    @utsavjasani1771 ปีที่แล้ว

    subse jyada easy way
    #include
    void changevalue(int *a)
    {
    *a = 4;
    }
    int main()
    {
    int a = 4, b = 3;
    printf("The value of is now %d
    ", a);
    changevalue(&a);
    printf("The value of is now %d
    ", b);
    printf("a+b=%d
    ", a + b);
    printf("a+b=%d
    ", a - b);
    return 0;
    }

  • @RajeshMudi
    @RajeshMudi 2 ปีที่แล้ว

    Bhaiya bohut ache se samaj mai aah rha hh

  • @TheRDVIRK
    @TheRDVIRK 4 ปีที่แล้ว +1

    bhai abhi one week se apko dekh rehe hu samj me b sab aa raha hai becouse i am a b.c.a student
    bhai pushna ye hai agar bi app ko ik sal ho gya is serise ko kiy app abhi hare comment read kar k answer do gye agar koi confiusion hou to
    comment isi liye nhi kar raha mai ki app ise chod chuke ho gye old seires ki vjha se

  • @sumitjhaldiyal9192
    @sumitjhaldiyal9192 3 ปีที่แล้ว

    Bhai app awesome ho.. Ek baar apsee milna chahunga......

  • @mrhuntsman5623
    @mrhuntsman5623 7 หลายเดือนก่อน

    #include
    void callbyref(int *a,int*b)
    {
    int one=*a;
    int two=*b;
    *a=one+two;
    *b=one-two;
    }
    int main()
    {
    int a=4,b=3;
    printf("The origional value is:
    %d and %d
    ",a,b);
    callbyref(&a,&b);
    printf("The origional value is:
    %d and %d
    ",a,b);
    return 0;
    }
    Challange acepted and completed

  • @gaudanikaushik1849
    @gaudanikaushik1849 8 หลายเดือนก่อน

    quick quiz sloved
    #include
    void changevalue(int *a,int *b)
    {
    int add = *a + *b;
    int subtrac = *a - *b;
    *a = add;
    *b = subtrac;
    }
    int main()
    {
    int a = 4,b = 3;
    printf("the value of a now is %d
    ",a);
    printf("the value of b now is %d
    ",b);
    changevalue(&a,&b);
    printf("add is %d
    ",a);
    printf("subtrac is %d
    ",b);
    return 0;
    }

  • @shivamshrivastava6530
    @shivamshrivastava6530 ปีที่แล้ว

    Harry bhai ki drawing is op ✨✨

  • @varunkolanu
    @varunkolanu 2 ปีที่แล้ว

    Challenge accepted sir:
    #include
    int func(int *x, int *y)
    {
    *x=*x+*y;
    *y=*x-2*(*y);
    }
    int main()
    {
    int a,b;
    scanf("%d %d",&a,&b);
    func(&a,&b);
    printf("a is %d, b is %d", a,b);
    return 0;
    }

  • @user-gi8lt3tc8n
    @user-gi8lt3tc8n 4 ปีที่แล้ว +3

    Sir why *x = *y changes their values

  • @pragyakumari9141
    @pragyakumari9141 3 ปีที่แล้ว +1

    veryyyyyyy gooooodddd lecture !!!!!!!!

  • @royfamily9273
    @royfamily9273 2 ปีที่แล้ว

    Thanks Harry Bhaiya

  • @subsavage5722
    @subsavage5722 2 ปีที่แล้ว

    thnku harry bhai aapne kya samjhaya hai

  • @emkaywho
    @emkaywho ปีที่แล้ว

    Thanks

  • @himanshuverma5974
    @himanshuverma5974 5 ปีที่แล้ว +2

    I lv u bhaiya ❤❤❤

  • @ShrirajKandale
    @ShrirajKandale ปีที่แล้ว

    Quick quiz ans;
    /* Given two no. a and b, add them and then subtract them and assign them to a and b resp using call by reference. */
    //a =5
    //b =4
    //after running the function the values of a and b should be:
    //a = 9
    //b = 1
    #include
    void func( int *x, int *y)
    {
    int temp = *x;
    *x = *x + *y;
    *y = temp - *y;
    }
    int main()
    {
    int a,b;
    printf("enter a = ");
    scanf("%d",&a);
    printf("enter b = ");
    scanf("%d",&b);
    func(&a, &b);
    printf("after using function the valyes are
    ");
    printf("a = %d
    b =%d",a,b);
    return 0;
    }

  • @gaudanikaushik1849
    @gaudanikaushik1849 8 หลายเดือนก่อน

    hi sir esme muje array elements ko sum karvana ho to kese kare

  • @AryanGupta-ft5mp
    @AryanGupta-ft5mp 2 ปีที่แล้ว

    Can I change the value of ram blocks used by other running programs?

  • @chandrashekharchavan519
    @chandrashekharchavan519 ปีที่แล้ว +1

    # include
    void swap(int*a, int*b){
    int temp = *a+*b;
    int temp2 = *a-*b;
    *a = temp;
    *b = temp2;
    return;
    }
    int main(){
    int x=5, y=3;
    // printf("the addition of x and y is %d
    ",add(x,y));
    printf("the swap of x and y is %d and %d
    ", x,y);
    swap(&x,&y);
    printf("the swap of x and y is %d and %d
    ", x,y);

    return 0;
    }

  • @namanjain6502
    @namanjain6502 2 ปีที่แล้ว +1

    // Online C compiler to run C program online
    #include
    void change(int *x,int *y){
    *x=*x+*y;
    *y=*x-2*(*y);
    }
    int main() {
    int a=4,b=3;
    printf("the value of a=%d and b=%d
    ",a,b);
    change(&a,&b);
    printf("the value of a=%d and b=%d",a,b);
    return 0;
    }

  • @TechnicalAnkesh
    @TechnicalAnkesh 4 ปีที่แล้ว +1

    challenge accepted
    solved:
    #include
    int sum(int *a, int *b)
    {
    int sum;
    sum = *a + *b;
    return sum;
    }
    int subtract(int *a, int *b)
    {
    int result;
    result = *a - *b;
    return result;
    }
    int assign(int *a, int *b)
    {
    int result;
    result = *a *= *b;
    }
    int main()
    {
    int a = 4, b = 3;
    printf("The value of a is %d and b is %d
    ", a, b);
    printf("After adding a and b the sum is %d
    ", sum(&a, &b));
    printf("After subtracting them the value is %d
    ", subtract(&a, &b));
    printf("After assigning the value is %d
    ", assign(&a, &b));
    return 0;
    }

  • @aakash9025
    @aakash9025 5 ปีที่แล้ว +1

    Marvelous One Bro 👌

  • @sushantravva8533
    @sushantravva8533 2 ปีที่แล้ว +1

    // given 2 numbers a and b, add them then subtract them
    // and assign them to a and b using call by reference
    // make a = abs(a-b) and b = a+b
    #include
    void modify(int *x, int *y)
    {
    if (*x > *y)
    {
    int m;
    m = *x; // stored a copy of the value of a in a variable m
    *x = *x - *y;
    *y = m + *y;
    }
    else if (*x < *y)
    {
    int n;
    n = *x; // stored a copy of the value of a in a variable n
    *x = *y - *x;
    *y = *y + n;
    }
    }
    int main()
    {
    int a = 16, b = 20;
    printf("The value of a before modification is %d and the value of b before modification is %d
    ", a, b);
    modify(&a, &b);
    printf("The new value of a after modification is %d and the new value of b after modification is %d
    ", a, b);
    return 0;
    }

  • @krishnabhakti9705
    @krishnabhakti9705 3 ปีที่แล้ว +1

    Nice

  • @funhourswithyash
    @funhourswithyash 8 หลายเดือนก่อน

    #include
    int quickquiz(int* a,int* b){
    *a=*a+*b;
    *b=*a-*b-*b;
    }
    int main(){
    int a=4,b=3;
    printf("the value of a and b is %d and %d
    ",a,b);
    quickquiz(&a,&b);
    printf("value after function call a= %d and b= %d ",a,b);
    return 0;
    }

  • @vipulponugoti7120
    @vipulponugoti7120 ปีที่แล้ว

    // Quick Quiz:
    // Given two numbers a and b, add them then subtract them and assign them to a and b using call by reference.
    // a = 4
    // b = 3
    // after running the function, the values of a and b should be:
    // a = 7
    // b = 1
    #include
    void ar(int* x,int*y)
    {
    int temp=*x;
    *x=*x+*y;
    *y=temp-*y;
    }
    int main()
    {
    int a=4,b=3;
    printf("The value of a is %d and b is %d
    ",a,b);
    ar(&a,&b);
    printf("The value a now is %d and b now is %d
    ",a,b);
    return 0;
    }

  • @shanvisoni3203
    @shanvisoni3203 ปีที่แล้ว

    #include
    Void changevalue(int *x, int *y) {
    return ;
    }
    Int main() {
    Int a = 4, b= 5;
    Int s = a+b;
    Int k = a-b;
    Changevalue(&s,&k);
    Printf("The value is %d and %d", s,k);
    return 0;
    }
    _______________________________________
    OUTPUT ->
    The value is 9 and -1

  • @vishalkarmakar418
    @vishalkarmakar418 3 ปีที่แล้ว

    thank you bhaiya i love you alot ❤❤❤❤❤❤❤

  • @dewannazmulislam9004
    @dewannazmulislam9004 3 ปีที่แล้ว

    dada love from bangladesh

  • @rajumandal4156
    @rajumandal4156 ปีที่แล้ว

    /*Quick Quiz;
    Given two numbers a and b, add them then subtract them and assign them to a and b using call by reference.

    a = 4
    b = 3
    after running the function, the values of a and b should be :
    a = 7
    b = 1
    */
    #include
    void add_sub(int *a1 ,int *b1)
    {
    int temp;
    temp=*a1;
    *a1= *a1 + *b1;
    *b1 = temp - *b1;
    }
    int main()
    {
    int a = 4, b =3 ;
    printf("the value of a is %d and the value of b is %d
    ",a,b);
    add_sub(&a,&b);
    printf("the value of a and b now is %d and %d
    ",a,b);

    return 0;
    }

  • @Chirag_Sharma_
    @Chirag_Sharma_ 3 ปีที่แล้ว

    challenge accepted
    sir!

  • @mohammadsobanshaikh4340
    @mohammadsobanshaikh4340 3 ปีที่แล้ว

    Challenge accepted and done successfully after 2 yrs

  • @hotrecipe9267
    @hotrecipe9267 ปีที่แล้ว

    #include
    int sumandsub(int *a, int *b)
    {
    int temp;
    temp = *a;
    *a = temp + *b;
    *b = *b - temp;
    printf("sum of a=%d
    ", *a);
    printf("subtraction of b=%d
    ", *b);
    return 0;
    }
    int main()
    {
    int a, b;
    printf("the numbers are
    ");
    scanf("%d%d", &a, &b);
    sumandsub(&a, &b);
    }

  • @MukeshKumar-fz3sw
    @MukeshKumar-fz3sw 2 ปีที่แล้ว

    chalenge accept :-
    #include
    void changeformat(int* x, int* y){
    int temp;
    temp = *x;
    *x = *x + *y;
    *y = temp - *y;
    return;
    }
    int main() {
    int a=4;
    int b=3;
    printf("the value of a is: %d and the value of b is: %d
    " , a,b);
    changeformat(&a,&b);
    printf("the addition of a and b is: %d and the subtraction of a and b is: %d
    " ,a,b);
    return 0;
    }

  • @indianriddle925
    @indianriddle925 4 หลายเดือนก่อน

    #include
    void adding(int* add1, int* add2)
    {
    int temp;
    temp = *add1;
    *add1 = *add1 + *add2;
    *add2 = temp - *add2;
    return;
    }
    int main()
    {
    int a = 4, b=3;
    printf("before running the program a is %d and b is %d
    ",a,b);
    adding(&a,&b);
    printf("after running the program a is %d and b is %d
    ",a,b);
    return 0;
    }

  • @Ermds1966
    @Ermds1966 4 หลายเดือนก่อน

    #include
    //Author : Eshita Das
    //QUIZ:Given two numbers a and b, add them, subtract them and assign them to a and b
    void opr(int *a,int *b)
    {
    int add,sub;
    add=*a+*b;
    sub=*a-*b;
    *a=add;
    *b=sub;
    }
    void main()
    {
    int a=78,b=24;
    printf("The value of a is %d and of b is %d
    ",a,b); //The value of a is 78 and of b is 24
    opr(&a,&b);
    printf("The new value of a is %d and of b is %d
    ",a,b); //The new value of a is 102 and of b is 54
    }

  • @onlynature6153
    @onlynature6153 5 หลายเดือนก่อน

    Challange accepted 😮

  • @dogs9477
    @dogs9477 ปีที่แล้ว

    Change complete 💯

  • @MizanurRahaman03
    @MizanurRahaman03 4 ปีที่แล้ว +1

    challenge accepted
    input:-
    #include
    int functionsum(int *x, int *y)
    {
    int sum;
    sum = *x + *y;
    }
    int functionsub(int *x, int *y)
    {
    int sum;
    sum = *x - *y;
    }
    int functionmul(int *x, int *y)
    {
    int sum;
    sum = *x * *y;
    }
    int functiondiv(int *x, int *y)
    {
    int sum;
    sum = *x / *y;
    }
    int main()
    {
    int a;
    printf("0. Exit
    ");
    printf("1. Addition
    ");
    printf("2. Substraction
    ");
    printf("3. Multiplication
    ");
    printf("4. Division
    ");
    printf("Entre your number
    ");
    scanf("%d", &a);
    switch (a)
    {
    int mun1, mun2, c;
    case 0:
    printf("Exit from programe
    ");
    break;
    case 1:
    printf("enter your first number=
    ");
    scanf("%d", &mun1);
    printf("enter your second number=
    ");
    scanf("%d", &mun2);
    c = functionsum(&mun1, &mun2);
    printf("the answer is=%d
    ", c);
    break;
    case 2:
    printf("enter your first number=
    ");
    scanf("%d", &mun1);
    printf("enter your second number=
    ");
    scanf("%d", &mun2);
    c = functionsub(&mun1, &mun2);
    printf("the answer is=%d
    ", c);
    break;
    case 3:
    printf("enter your first number=
    ");
    scanf("%d", &mun1);
    printf("enter your second number=
    ");
    scanf("%d", &mun2);
    c = functionmul(&mun1, &mun2);
    printf("the answer is=%d
    ", c);
    break;
    case 4:
    printf("enter your first number=
    ");
    scanf("%d", &mun1);
    printf("enter your second number=
    ");
    scanf("%d", &mun2);
    c = functiondiv(&mun1, &mun2);
    printf("the answer is=%d
    ", c);
    break;
    default:
    printf("you have entered a wrong number
    ");
    }
    return 0;
    }

  • @Piyush_Sharma--
    @Piyush_Sharma-- ปีที่แล้ว

    i have copy of my code bro from tuts 1

  • @mohitgupta4723
    @mohitgupta4723 2 ปีที่แล้ว

    challege accecpted

  • @techrohithd
    @techrohithd 3 ปีที่แล้ว

    Katai jehar

  • @vikasindla3067
    @vikasindla3067 ปีที่แล้ว

    Awwwwesomme❤❤

  • @SayZion
    @SayZion 3 ปีที่แล้ว +1

    7:01 is our childhood memories!! XD
    AGREE?

  • @mollikabarman454
    @mollikabarman454 ปีที่แล้ว

    #include
    void changedValue(int *A, int *B)
    {
    *A = *A + *B;
    *B = *A - *B;
    }
    int main()
    {
    int a, b;
    a = 4;
    b = 3;
    printf("Before calling function:
    ");
    printf("a = %d
    ", a);
    printf("b = %d
    ", b);
    changedValue(&a, &b);
    printf("After calling function:
    ");
    printf("a = %d
    ", a);
    printf("b = %d
    ", b);
    return 0;
    }
    OUTPUT:
    Before calling function:
    a = 4
    b = 3
    After calling function:
    a = 7
    b = 4

  • @chiteez_____1562
    @chiteez_____1562 11 หลายเดือนก่อน

    Challenge accepted ! ❤👍

  • @priyanshkumar17
    @priyanshkumar17 ปีที่แล้ว

    Challenge accepted...
    #include
    void changeValue(int*x,int*y){
    int add = *x + *y;
    int sub = *x - *y;
    *x = add;
    *y = sub;
    return;

    }
    int main()
    {
    int a = 4 , b = 3;
    printf("Current value of a and b are: %d and %d
    ",a,b);
    changeValue(&a , &b);
    printf("Current value of a and b are: %d and %d
    ",a,b);
    return 0;
    }

  • @muhammadsameer9161
    @muhammadsameer9161 4 ปีที่แล้ว +4

    Challenge accepted ❤️
    Sub samj a rha hai bro

  • @DeveshGautam-y6o
    @DeveshGautam-y6o 11 หลายเดือนก่อน

    #include
    void addsubtractreference(int* p,int*q)//int* p and int *p are same
    {
    int sum=*p + *q;
    int subtract=*p -*q;
    *p=sum;
    *q=subtract;
    }
    int main()
    {
    int x=10;
    int y=2;
    printf("x is %d and y is %d
    ",x,y);//x is 10 and y is 2
    addsubtractreference(&x,&y);//call by reference
    printf("x is %d and y is %d
    ",x,y);//x is 12 and y is 8
    return 0;
    }

  • @riyasinghbaghel4537
    @riyasinghbaghel4537 3 ปีที่แล้ว +1

    👍🏻👍🏻

  • @roshanborad8147
    @roshanborad8147 ปีที่แล้ว

    #include
    int add(int a, int b){
    return a+b;
    }
    int minus(int a, int b){
    return a-b;
    }
    int main(int argc, char const *argv[])
    {
    int a=6, b=5, c, d;
    c=add(a,b);
    d=minus(a,b);
    printf("The value of a is %d
    ", a);
    printf("The value of b is %d
    ", b);
    printf("The substraction of a is %d
    ", c);
    printf("The value of b is now %d
    ", d);
    return 0;
    }

  • @soulSynthRecords
    @soulSynthRecords 2 ปีที่แล้ว

    Challenge excerpted 😎😎

  • @SoorajKudale_
    @SoorajKudale_ 2 ปีที่แล้ว

    #challenege accepted by#suraj kudale

    • @SoorajKudale_
      @SoorajKudale_ 2 ปีที่แล้ว

      #include
      #include
      void addsub( int *x, int *y,int *z ,int *l,int *n,int *o)
      {
      *z = *x + *y;
      printf("the value of *x is now %d
      ",*x);
      printf("the value of *y is now %d

      ",*y);
      printf("the value of *z is now %d

      ",*z);
      *o = *l-*n;
      printf("the value of *l is now %d

      ",*l);
      printf("the value of *o is now %d

      ",*o);
      printf("the value of *n is now %d

      ",*n);
      }
      int main()
      {
      int a = 12, b = 5,c,l=20,n=15,o;
      printf("the value of a is now %d

      ", a);
      printf("the value of b is now %d

      ", b);
      addsub(&a,&b,&c,&l,&n,&o);
      printf("the value of c now is %d

      ",c);
      printf("the value of o now is %d

      ",o);
      return 0;
      }
      ###output:-the value of a is now 12
      the value of b is now 5
      the value of *x is now 12
      the value of *y is now 5
      the value of *z is now 17
      the value of *l is now 20
      the value of *o is now 5
      the value of *n is now 15
      the value of c now is 17
      the value of o now is 5

  • @shivsrikakolum2100
    @shivsrikakolum2100 ปีที่แล้ว

    bhai mene A=b = c aur A- b = d fir c and d value ko x and y me dia

  • @himanshivarma3511
    @himanshivarma3511 2 ปีที่แล้ว

    #include
    void add(int *a1,int *b1)
    {
    int temp;
    temp = *a1;
    *a1 = *a1 + *b1;
    *b1 = temp - *b1;
    return;
    }
    int main()
    {
    int a=34,b=33;
    printf("The value of a and b are %d and %d
    ",a,b);
    add(&a,&b);
    printf("After runnning the function the value of a and b are: %d,%d",a,b);
    return 0;
    }

  • @Ashish...114
    @Ashish...114 11 หลายเดือนก่อน

    challenge accepted 😀!!!

  • @harshr18
    @harshr18 2 ปีที่แล้ว

    challenge accepted .
    i know i am very late .
    quick quiz amswer is :
    #include
    void interchange(int *A,int*B)
    {
    int sum,substract;
    sum=*A+*B;
    substract=*A-*B;
    *A=sum;
    *B=substract;
    return ;
    }
    int main()
    {
    int a,b;
    printf("Enter the number of a and b
    ");
    scanf("%d
    ",&a);
    scanf("%d",&b);
    printf("The value of a and b is now %d and %d
    ",a,b);
    printf("The sum of a and b is %d
    ",a+b);
    printf("The substract of this value of a and b is %d
    ",a-b);

    interchange(&a,&b);
    printf("The value Of a =%d
    ",a);
    printf("The value Of b =%d
    ",b);
    printf("THE SUM OF THIS NEW VALUE OF a AND b IS %d
    ",a+b );
    printf("THE SUBSTRACT OF THIS NEW VALUE OF a AND b IS %d
    ",a-b );

    return 0;
    }

  • @piyushbera8242
    @piyushbera8242 ปีที่แล้ว

    challenge accepted!
    #include
    int performOpsandAssign(int *num1, int *num2)
    {
    int add, subtract;
    add = *num1 + *num2;
    subtract = *num1 - *num2;
    *num1 = add;
    *num2 = subtract;
    return 0;
    }
    int main()
    {
    int a, b;
    printf("Enter two integers: ");
    scanf("%d %d", &a, &b);
    printf("Entered numbers: %d and %d
    ", a, b);
    performOpsandAssign(&a, &b);
    printf("Assigned values after addition and substraction of a and b:%d and %d", a, b);
    return 0;
    }

  • @ashutoshanand4040
    @ashutoshanand4040 4 ปีที่แล้ว

    Best explanation in the entire youtube🤗😘

  • @vanshpandey4535
    @vanshpandey4535 หลายเดือนก่อน

    #include
    void swap(int *a, int *b)
    {
    int temp;
    temp=*a-*b;
    *a=*a+*b;
    *b=temp;
    }
    int main()
    {
    int a,b;
    printf("Enter a number a
    ");
    scanf("%d", &a);
    printf("Enter a number b
    ");
    scanf("%d", &b);
    printf("a+b=%d
    ", a+b);
    printf("a-b=%d
    ", a-b);
    swap(&a,&b);
    printf("After swapping the values of a and b with their sums and difference , the values assign will be %d and %d respectively
    ", a,b);
    }

  • @vgx15gaming37
    @vgx15gaming37 3 ปีที่แล้ว

    challenge accepted bhai

  • @rohankumar5190
    @rohankumar5190 3 ปีที่แล้ว

    Alright guyz 🔥

  • @msg4443
    @msg4443 4 ปีที่แล้ว +1

    I am perfectly comfortable

  • @Crazymovies25
    @Crazymovies25 ปีที่แล้ว

    #include
    void swap(int* x,int* y);
    {
    int temp;
    temp=*x-*y;
    *x=*x+*y;
    *y=temp;
    return 0;
    }
    int main()
    {
    int a=4,b=3;
    printf("%d"and"%d
    ",a,b);
    swap(&a,&b);
    printf("%d"and"%d
    ",a,b);
    return 0;
    }

  • @Matrix_Breakerz
    @Matrix_Breakerz 2 ปีที่แล้ว

    challeneg accepted

  • @sahiljaiswal258
    @sahiljaiswal258 2 ปีที่แล้ว

    #include
    int function(int *x, int *y) // x is equal to &a (bcoz at downwards i had mentioned the first thing is &a)
    // then *x is *&a is equal to value of a
    {
    int temp;
    temp = *x;
    *x = *x + *y;
    *y = temp - *y;
    }
    int main()
    {
    int a, b;
    printf("Enter the value of a
    ");
    scanf("%d", &a);
    printf("Enter the value of b
    ");
    scanf("%d", &b);
    function(&a, &b);
    printf("The new values of a & b now are %d, %d
    ", a, b);
    return 0;
    }

  • @manthanpatel7904
    @manthanpatel7904 ปีที่แล้ว

    #include
    int call(*a,*b);
    int main()
    {
    int a,b;
    printf("Enter value of a =");
    scanf("%d",&a);
    printf("
    Enter value of b =");
    scanf("
    %d",&b);
    printf("a=%d
    b=%d",a,b);
    call(&a,&b);
    printf("
    a=%d
    b=%d",a,b);
    return 0;
    }
    int call(int *a,int *b)
    {
    int x,y;
    x=*a+*b;
    y=*a-*b;
    *a=x;
    *b=y;
    }

  • @arshi5532
    @arshi5532 ปีที่แล้ว

    //Quick quiz
    #include
    void fun(int *first, int *second)
    {
    int sum,sub;
    sum = *first + *second;
    sub = *first - *second;
    *first = sum;
    *second = sub;
    return ;
    }
    int main()
    {
    int a,b;
    printf("Give the values of a and b
    ");
    scanf("%d %d" , &a,&b);
    printf("The values of a and b are %d and %d respectively
    ", a , b);
    fun(&a , &b);
    printf("The values of a and b now are %d and %d respectively
    ",a , b);
    return 0;
    }

  • @LAARALIVE
    @LAARALIVE 7 หลายเดือนก่อน

    Challenge accepted 🎉🎉

  • @mehardua4761
    @mehardua4761 3 ปีที่แล้ว

    accepted

  • @can_yaman780
    @can_yaman780 ปีที่แล้ว

    #Challenge Accepted
    #include
    void sum(int*a, int*b)
    {
    int rar1, rar2;
    rar1 = *a + *b;
    rar2 = *a - *b;
    *a = rar1;
    *b = rar2;
    }
    int main()
    {
    int x = 4, y = 3;
    printf("The value of x=%d and y=%d
    ",x,y);
    sum(&x, &y);
    printf("The value is now:x=%d y=%d
    ", x,y);
    return 0;
    }

  • @regnaromusic7325
    @regnaromusic7325 ปีที่แล้ว

    #include
    void swapper(int* a, int* b){
    int temp_add = *a + *b;
    int temp_sub = *a - *b;
    *a = temp_add;
    *b = temp_sub;
    printf("%d, %d", *a,*b);
    return;
    }
    int main(int argc, char const *argv[])
    {
    int a = 4;
    int b = 3;
    swapper(&a, &b);
    return 0;
    }

  • @babawebdev6908
    @babawebdev6908 2 ปีที่แล้ว

    quiz:
    #include
    void ads(int a , int b,int *add,int *sub){
    *add = a+b;
    *sub = a-b;
    }
    int main(){
    int a=3,b=4;
    int add,sub;
    ads(a,b,&add,&sub);
    printf("SUM:%d
    ",add);
    printf("DIFFERENCE:%d
    ",sub);

    return 0;
    }

  • @TEMERED_HOUSE_PATNA85
    @TEMERED_HOUSE_PATNA85 3 ปีที่แล้ว

    Bhai mujhe ek chij nahi samajh me nahi aa raha hai ki
    Call by value or call by refrence dono ke kya writing difference hai

    • @shivamdaund181
      @shivamdaund181 3 ปีที่แล้ว

      By reference mai address use krte hai isliye usme pointers aur address dene ke liye & use krte hai

  • @ankitaghosh7402
    @ankitaghosh7402 ปีที่แล้ว

    ARMSTRONG NUMBER using CALL BY VALUE:
    #include
    int armstrong (int a); //function declaration
    int main()
    {
    int n;
    printf("enter the number: ");
    scanf("%d", &n);
    printf("the number is %d
    ",n);
    if(n==armstrong(n)) //call by value
    {
    printf("It is an Armstrong no
    ");

    }
    else
    {
    printf("It is NOT an Armstrong no
    ");
    }

    return 0;
    }

    int armstrong (int a) //function definition
    {
    int digit, sum = 0;
    while (a != 0)
    {
    digit = a % 10;
    a = a / 10;
    printf("the digits are: %d
    ", digit);
    sum = sum + (digit * digit * digit);
    }
    return(sum);
    }

  • @rootom2144
    @rootom2144 4 ปีที่แล้ว +2

    what is your real name bro?

  • @inevitableman4159
    @inevitableman4159 3 ปีที่แล้ว

    Printf("challenge accepted");

  • @prapti2385
    @prapti2385 9 หลายเดือนก่อน

    #include
    void add_subtract(int* a, int* b)
    {
    int temp=*a;
    *a=*a+*b;
    *b=temp-*b;
    }
    int main()
    {
    int a,b;
    printf("Enter two numbers
    ");
    scanf("%d",&a);
    scanf("%d",&b);
    printf("The value of a is %d and the value of b is %d
    ",a,b);
    add_subtract(&a,&b);
    printf("The value of a is %d and the value of b is %d
    ",a,b);
    return 0;
    }

  • @Rohith-p7q
    @Rohith-p7q ปีที่แล้ว

    #include
    void rd(int* x, int* y)
    {
    int temp;
    int tempe;
    temp = *x;
    tempe = *y;
    *x = temp + tempe;
    *y = temp - tempe;
    }
    int main()
    {
    int a = 4, b = 3;
    rd(&a, &b);
    printf("value of a is %d and b is %d", a, b);

    return 0;
    }

  • @amitdas4517
    @amitdas4517 2 ปีที่แล้ว

    #include
    int develope(int* a,int* b)
    {
    *a=*a+*b;
    *b=*a-*b;
    return;
    }
    void main()
    {
    int x=84,y=99;
    printf("x is now %d and y is now %d
    ",x,y);
    develope(&x,&y);
    printf("x is now %d and y is now %d
    ",x,y);
    }