Praveen | Typing Speed Test is a very useful Software available for free Download.

C Programs to Swap Two Numbers

      C program to swap two numbers with And without using third variable, Swapping means to interchange of two numbers. In this program to Swapping two numbers with using third variables.


Swapping of two With Third Variable numbers in C program codes

#include<stdio.h>
#include<conio.h>

void main()
{
   int a, b, temp;
   clrscr();
   printf("\n Enter the two values of a And b ");
   scanf("%d%d",&a, &b);
   temp = a;
   a = b;
   b = temp;
   printf("\n After Swapping a = %d\t, b = %d",a,b);
   getch();
}


Output:-