Rahul's Programming Heaven
C,C++,Java,C#,.Net, Win32,Visual C++, Windows Programming & How To's. Get All The Solutions.
Blog Archive
Blog Archive
February (1)
March (1)
April (1)
September (2)
August (1)
May (3)
December (1)
September (1)
August (19)
May (7)
November (2)
August (1)
Sunday, August 29, 2010
Swap the values of two numbers without using third variable
/*
Swap the values of two numbers without using third variable
*/
#include<stdio.h>
void main()
{
int a=5,b=10;
a = a+b;
b=a-b;
a=a-b;
printf("a = %d, b = %d",a,b);
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment