Program to swap two variables by using third variable.

Published: 08 August 2019
on channel: Sunita Panthi
22
4

A program to swap two variables entered by the user by using third variable. Learn coading, keep going and increasing knowledge.

Here is the code:
void main()
{
int a,b,c;
printf("Enter the first number\t");
scanf("%d",&a);
printf("Enter the second number\t");
scanf("%d",&b);
printf("\nThe numbers before swapping are first=%d and second=%d",a,b);
c=b;
b=a;
a=c;
printf("\nThe numbers after swapping are first=%d and second=%d",a,b);
getch();
}


On this page of the site you can watch the video online Program to swap two variables by using third variable. with a duration of hours minute second in good quality, which was uploaded by the user Sunita Panthi 08 August 2019, share the link with friends and acquaintances, this video has already been watched 22 times on youtube and it was liked by 4 viewers. Enjoy your viewing!