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

What is a far pointer in c?

1032


the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?

988


How many levels deep can include files be nested?

1130


What does p mean in physics?

1026


Write a code to generate divisors of an integer?

1057


What is optimization in c?

989


any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above

1128


the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters

2286


Write a code of a general series where the next element is the sum of last k terms.

1021


What is scope rule in c?

1049


What is #include stdio h and #include conio h?

1090


What is getch c?

1283


Explain how can you tell whether two strings are the same?

1000


How do c compilers work?

1109


Why is a semicolon (;) put at the end of every program statement?

1057