//C Program for Exchange of value of 2 variable with Temporary Variable
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,temp;
clrscr();
printf("\nEnter the value for a & b");
scanf("%d%d",&a,&b);
temp=a;
a=b;
b=temp;
printf("\na=%d",a);
printf("\nb=%d",b);
getch();
}
Hope you liked my posts, give comments if you have any doubts.. :)#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,temp;
clrscr();
printf("\nEnter the value for a & b");
scanf("%d%d",&a,&b);
temp=a;
a=b;
b=temp;
printf("\na=%d",a);
printf("\nb=%d",b);
getch();
}
Categories:
c program
0 comments:
Post a Comment