c/swap.c

22 lines
240 B
C
Raw Permalink Normal View History

2023-01-13 09:14:28 -05:00
#include <stdio.h>
void swap(int a, int b) {
int t = a;
a = b;
b = t;
printf("swap: a = %d, b = %d\n",a,b);
}
int main(void) {
int a = 21;
int b = 17;
printf("main: a = %d, b = %d\n",a,b);
swap(a, b);
return 0;
}