1 #include <stdio.h>
2 #include <stdlib.h>
3
4 int main(){
5 int a=5;
6 int b=8;
7 printf("a=%d,b=%d",a,b);
8
9 a=a^b;(按位异或)
10 b=a^b;
11 a=a^b;
12
13 printf("a=%d,b=%d",a,b);
14 }
1 #include <stdio.h>
2 #include <stdlib.h>
3
4 int main(){
5 int a=5;
6 int b=8;
7 printf("a=%d,b=%d",a,b);
8
9 a=a^b;(按位异或)
10 b=a^b;
11 a=a^b;
12
13 printf("a=%d,b=%d",a,b);
14 }