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

What is the difference between text and binary modes?

1200


What is array of structure in c?

1191


What is the advantage of an array over individual variables?

1244


What is indirection? How many levels of pointers can you have?

1153


What is main function in c?

1088


What is the scope of local variable in c?

1140


What is bss in c?

1111


Write a progarm to find the length of string using switch case?

2073


what do you mean by inline function in C?

1064


What is bin sh c?

1050


What is conio h in c?

1051


What does the characters “r” and “w” mean when writing programs that will make use of files?

1487


How can I pad a string to a known length?

1041


Subtract Two Number Without Using Subtraction Operator

859


What is difference between union and structure in c?

1178