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

What is the purpose of main() function?

1243


What is a program flowchart and how does it help in writing a program?

1136


Find duplicates in a file containing 6 digit number (like uid) in O (n) time.

3241


What is difference between arrays and pointers?

1063


Is c dynamically typed?

1150


What are the benefits of organizational structure?

1019


write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.

15996


What are the usage of pointer in c?

1193


What is static volatile in c?

1019


What is c language in simple words?

1068


Why do we need functions in c?

1015


Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent

2123


Explain Function Pointer?

1161


Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?

1067


What is the use of #include in c?

1079