NVIDIA Interview Question
Software Engineer / DevelopersI am getting correct output with basic approach...the above approach is not working for me...
int main()
{
int a = 51;
int b = 51;
a = a^b;
printf("a:%d\nb:%d\n",a,b);
b = a^b;
printf("a:%d\nb:%d\n",a,b);
a = a^b;
printf("a:%d\nb:%d\n",a,b);
}
a ^= b;
- Anonymous August 20, 2008b ^= a;
a ^= b;