How do you save space using XOR in C? What does the code below do?

后端 未结 0 653
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-21 18:35
`void f(int *a, int *b)
{
*a = *a ^ *b;
*b = *a ^ *b;
*a = *a ^ *b;
}`

this code has no local variables and two int parameters

相关标签:
回答
  • 消灭零回复
提交回复
热议问题