APC-PRAC-009.c (429B)
1 /* 2 * Author: Amit Dutta (amitdutta4255@gmail.com) | Date: 12 Dec 2025 3 * Repo: https://github.com/notamitgamer/bsc 4 * License: MIT 5 */ 6 7 /* WAP to swap two integer variable without using Third variable. */ 8 9 #include <stdio.h> 10 int main() 11 { 12 int a = 4, b = 6; 13 printf("Before swap : A = %d and B = %d", a, b); 14 a = a ^ b; 15 b = a ^ b; 16 a = a ^ b; 17 printf("\nAfter swap : A = %d and B = %d", a, b); 18 return 0; 19 }