swapping



normal programme of swapping in c programming


swapping programming value is transfer each other like a=12 and b=43 then we put this value in giver programme the output is a=43 and b=12. this programme make to type first using helping function and without using helping function. here i am provide you both type of programme like using helping function and without using helping function. first you write starting basic structure like #include<stdio.h>, #include<conio.h> then write void main() after void main open bracket {}
and enter programme in this bracket 

making swapping programme with using helping function first use three integer int a,b,c; then use clrscr() [clrscr is use for clear screen previous programme output]then scan value of a and b printf("a="); , scanf("%d",&a);    printf("b="); , scanf("%d",&b); after putting a and b value write main part of this programme a=c; c=b; b=a; then print a and b value printf("%d %d",a,b); and end programme with getch();


#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("a=");
scanf("%d",&a);
printf("b=");
scanf("%d",&b);
a=c;
c=b;
b=a;
printf("%d %d",a,b);
getch();
}