Page 1 of 1

While swapping 2 numbers what precautions to be taken care?

Posted: Wed Jul 13, 2022 7:54 pm
by answerhappygod
b = (b / a);
a = a * b;
b = a / b;
a) Data type should be either of short, int and long
b) Data type should be either of float and double
c) All data types are accepted except for (char *)
d) This code doesn’t swap 2 numbers