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...

How do we swap or interchange any 2 numbers without using
Temporary variable...Anybody can pls answer it.. Thanks in
Advance

Answer Posted / manju

main()
{
int a=16,b=19;
a=a+b;
b=a-b;
a=a-b;
printf("a and b are:%d\t%d",a,b);
}

Output:
a and b are:19 16

Is This Answer Correct ?    16 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How will you print TATA alone from TATA POWER using string copy and concate commands in C?

1325


What is the difference between functions abs() and fabs()?

1085


What is %d called in c?

1183


Explain enumerated types.

978


What are the restrictions of a modulus operator?

1063


What should malloc() do? Return a null pointer or a pointer to 0 bytes?

1015


Discuss the function of conditional operator, size of operator and comma operator with examples.

1098


What is a list in c?

983


If you know then define #pragma?

1054


How do you print an address?

1212


the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b

2614


What is structure of c program?

1079


how can f be used for both float and double arguments in printf? Are not they different types?

1014


Explain setjmp()?

1008


Process by which one bit pattern in to another by bit wise operation is?

1097