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 / r.aruna

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

Is This Answer Correct ?    11 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Calculate 1*2*3*____*n using recursive function??

1996


What is oops c?

1146


How do you sort filenames in a directory?

1135


Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor

3487


Why pointers are used?

1030


What are the different types of control structures in programming?

1097


find out largest elemant of diagonalmatrix

2191


Explain setjmp()?

1024


What is the difference between #include and #include 'file' ?

1018


using for loop sum 2 number of any 4 digit number in c language

2283


What is the code in while loop that returns the output of given code?

1926


What is the advantage of an array over individual variables?

1199


What is the difference between local variable and global variable in c?

1177


What does %2f mean in c?

1173


What is an array? What the different types of arrays in c?

1126