View Single Post
Old 29-03-06, 12:20 AM   #3 (permalink)
freshersen
Junior Member
 
Join Date: Mar 2006
Location: India
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 3 freshersen has disabled reputation


hi , am trying to swap(M,N) without using temp variable.


this is the question , i could attened the debuging context


#include<stdio.h>


void main()
{
int M = 5, N = 3;
printf("\nBefore Swap ");
printf("\n\tM=%d\tN=%d",M,N);

M = M + N;
N = M - N;
M = M - N;


printf("\nAfter Swap ");
printf("\n\tM=%d\tN=%d",M,N);
}


__________________
Regard\'s
Senthil Kumar M
(9841892000)
freshersen is offline   Reply With Quote