Search This Blog

Read Your Language

Three variable swaping in C program


Write a program is three variable swaping  in C program.
#include<stdio.h>
main()
{
int a,b,c,swap;
a=1;
b=2;
c=3;
printf(" Swaping before the value of variable  is :  %d, %d  & %d\n",a,b,c);
swap=a;
a=b;
b=c;
c=swap;
printf(" \nSwaping after the the value of variable is : %d, %d  & %d\n ",a,b,c);

}



No comments:

Contact Form

Name

Email *

Message *

Followers