by Dinesh Thakur Category: C Programming (Pratical)

In this program the two numbers to be swapped from each other place with the use of third variable. In program the variables declare for storing the value in it. Here three variables are also declared (a,b,c) the use of only two numbers the swapping will happen. The first number shifted to third variable and then to other variable the reverse phase will be on the move to swap both numbers. And other functionality also comes in light for displaying the result on the screen.

Problem Statement:
This is C Program to Swap Two Numbers Using Third variable.

  1. Declaring variable.
  2. Using swap condition.
  3. Display result on the screen.

Here is source code of the C program to Swap a Two Number. The C program is successfully compiled. The program output is also shown below. 

int a,b,c;
printf("enter the two value");
 Swap a Two Number

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.C.A, MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.