不允许创建临时变量,交换两个数的内容

来源:互联网 发布:知乎 匿名信 丁香园 编辑:程序博客网 时间:2024/05/22 10:32
不允许创建临时变量,交换两个数的内容#include <stdio.h>int main(){int a = 10;int b = 20;a = a ^ b;b = a ^ b;a = a ^ b;printf("a= %d  b = %d\n", a,b);return 0;}
1 0