New course! Every coder should learn Generative AI!
Try a free lesson+ 1
How can i write a program which switch contets of two number....please give me the code that needs
content of two number
1 Answer
0
a ^= b;
b ^= a;
a ^= a;
Or use a temp:
NumberType tmp;
tmp = a;
a = b;
b = tmp;