P013.c (340B)
1 /* WAP to swap two integer variable without 2 using third variable */ 3 // using Approch Mode : complex, fast, less time consumimg 4 5 #include<stdio.h> 6 #include<math.h> 7 int main() { 8 int a = 4, b = 6; 9 printf("Before Swap : A = %d, B = %d", a, b); 10 a = a ^ b; 11 b = a ^ b; 12 a = a ^ b; 13 printf("\nAfter Swap : A = %d, B = %d", a, b); 14 return 0; 15 }