C Program To Swap Two Number With Third Variable

      No Comments on C Program To Swap Two Number With Third Variable
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int x=10,y=5,z;
printf(" Value of x before Swap:- %d ",x);
printf("\n Value of y before Swap:- %d ",y);
z=x;
x=y;
y=z;
printf("\n Value of x After Swap:- %d ",x);
printf("\n Value of y After Swap:- %d ",y);
 getch();
}

OUTPUT:-

scanfcode

Leave a Reply

Your email address will not be published. Required fields are marked *