• Source
    1. #include<stdio.h>
    2. int main()
    3. {
    4.  
    5. //swap two numbers using bitwise operator
    6. int x,y;
    7. printf(" Please, Enter the 1st Number : ");
    8. scanf("%d",&x);
    9. printf("\n Please, Enter the 2nd Number : ");
    10. scanf("%d",&y);
    11. //swapping -------->>
    12. x=x^y;
    13. y=x^y;
    14. x=x^y;
    15. printf("\n Now, the Numbers are : %d and %d",x,y);
    16. return 0;
    17. }