Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a program in C to swap two variables

Answer Posted / anju

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,temp;
scanf("%d%d",&a,&b);
printf("before swapping value of a=%d and b=%d",a,b);
temp=x;
x=y;
y=temp;
printf("after swapping value of a=%d and b=%d",a,b);
getch();
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does struct work in c?

1078


What is the meaning of 2d in c?

1118


How to Throw some light on the splay trees?

1052


Write the control statements in C language

1196


There seem to be a few missing operators ..

1044


Explain the difference between #include "..." And #include <...> In c?

1020


Explain union. What are its advantages?

1073


What are the types of pointers?

1105


Combinations of fibanocci prime series

1605


The difference between printf and fprintf is ?

1276


Explain how can I read and write comma-delimited text?

1158


What are the types of bitwise operator?

1104


Explain how can type-insensitive macros be created?

985


Does c have function or method?

991


Write a program to print numbers from 1 to 100 without using loop in c?

1072