swapping without ternary operator

 swapping without ternary opertsor





STUDY EVERTHING



#include <stdio.h>
#include <conio.h> 
#include <math.h>
int main (){
    int  a, b;

    printf("Enter the value of a & b: ");
    scanf("%d %d", &a, &b);
    a = a + b;
    b = a - b;
    a = a - b;

    
    printf("after swapping a and b = %d %d", a, b);

    getch();
}




Click on the above button to download load the code fir future use.


Post a Comment

If you have furthur QUERIES please let us know

Previous Post Next Post