C and C++ programs and MySQL
Always thinking in engineering style...
Showing posts with label
swapping
.
Show all posts
Showing posts with label
swapping
.
Show all posts
Tuesday, August 4, 2009
swapping without third variable and single line
main()
{
int a=15,b=5;
clrscr();
a=(a+b)-(b=(a+b)-b);
printf("a=%d b= %d",a,b);
getch();
}
output: a=5 b=10
Older Posts
Home
Subscribe to:
Posts (Atom)