Tuesday, 22 May 2018

Program to find swap of two variables in c

/* program to swap of two variable */
# include < stdio.h >
void main ()
{
int a,b ;
clrscr () ;
printf ("\n enter the value of a:") ;
scanf ("%d",& a) ;
printf ("\n enter the value of b:") ;
scanf ("%d",& b) ;
c = a ;
a = b ;
b = c ;
printf ("\n swap =%d", a) ;
printf ("\n swap =%d", b) ;
getch () ;
}

No comments:

Post a Comment

Featured post

Kalgudi Interview Round!!

Those who cleared the second round of kalgudi got an email from exceller to complete their Kalgudi Interview Round. So here we will discuss ...