February 4, 2011

C Program for Exchange of Value of 2 Variable without Temporary Variable


//C Program for Exchange of Value of 2 Variable without Temporary Variable
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("\nEnter the value for a & b");
scanf("%d%d",&a,&b);
a=a+b;
b=a-b;
a=a-b;
printf("a=%d",a);
printf("b=%d",b);
getch();
}

Hope you liked my posts, give comments if you have any doubts.. :)

Related Posts :



Categories:

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Related Posts with Thumbnails