external_7.c
Source Code
c
#include<stdio.h>
#define SWAP(a, b) \
do { \
__typeof__(a) temp = a; \
a = b; \
b = temp; \
} while (0) \
int main() {
int a, b;
printf("Enter two number: ");
scanf("%d %d", &a, &b);
printf("\nA = \'%d\', B = \'%d\'", a, b);
SWAP(a, b);
printf("\nA = \'%d\', B = \'%d\'", a, b);
return 0;
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18