Friday, 9 September 2011

How to Swap two integer numbers in C(Turbo C 3.0 compiler)?

Simplest one

c=a;
a=b;
b=c;

Note: The Value of the variable a & b must not exceed the maximum value that the variable can hold it.

This is the Most Safest Technique for swapping two integer variable in any language









No comments:

Post a Comment