sujithtom said:That was a cool idea. How about manipulating fuctions???
take 2 nos. x & y and do the following:
x=x+y
y=x-y
x=x-y
this is the best way to do it with out using a temp variablecg84 said:very simple...
take 2 nos. x & y and do the following:
x=x+y
y=x-y
x=x-y
and ur nos r swapped...
That was a cool idea. How about manipulating fuctions???
swatkat said:main()
{
getche();
}
How about this?
NikhilVerma said:Ok now here is another simple one....
Do the same swapping with strings... without using temp variable...
cg84 said:very simple...
take 2 nos. x & y and do the following:
x=x+y
y=x-y
x=x-y
and ur nos r swapped...