15 lines
170 B
C
15 lines
170 B
C
|
#include <stdio.h>
|
||
|
|
||
|
void swap(int* a, int* b) {
|
||
|
*a = *a ^ *b;
|
||
|
*b = *b ^ *a;
|
||
|
*a = *a ^ *b;
|
||
|
}
|
||
|
|
||
|
int main() {
|
||
|
int a = 3, b = 5;
|
||
|
swap(&a, &b);
|
||
|
printf("%d %d", a, b);
|
||
|
}
|
||
|
|