bsc

Comprehensive codebase and coursework for the 4-year B.Sc. Computer Science Honours degree (WBSU)

git clone https://github.com/notamitgamer/bsc.git
· rebuilt hourlyOpen on GitHub
root / semester_1 / tuition-c / P012.c

P012.c (317B)


      1 /* WAP to swap two integer variable without
      2 using third  variable */
      3 // using Approch Mode : simple, slow, time consuming
      4 
      5 #include<stdio.h>
      6 int main() {
      7 	int a = 4, b = 6;
      8 	printf("Before Swap : A = %d, B = %d", a, b);
      9 	a = a + b;
     10 	b = a - b;
     11 	a = a - b;
     12 	printf("\nAfter Swap : A = %d, B = %d", a, b);
     13 	return 0;
     14 }