标签:ret print 创建 return int pre code printf a+b
int main()
{
//交换两个int的变量,不创建额外变量
int a = 3;
int b = 5;
printf("%d %d\n", a, b);
a = a^b; //a=a+b
b = a^b; //b=a-b
a = a^b; //a=a-b
printf("%d %d\n", a, b);
return 0;
}
标签:ret print 创建 return int pre code printf a+b
原文地址:https://blog.51cto.com/14893161/2520731