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

swap two integer variables without using a third temporary
variable?

Answer Posted / sumit salve

a=a+b-(b=a);
or
a=a*b/(b=a);
this will also swap two numbers!!!

Thank You...

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are keywords in c with examples?

1094


Write a program on swapping (100, 50)

1135


What is action and transformation in spark?

1171


What are disadvantages of C language.

1168


What is multidimensional arrays

1135


What is c variable?

1050


Explain continue keyword in c

1027


What is #include called?

1066


what is use of malloc and calloc?

1911


How can I direct output to the printer?

1327


Explain about block scope in c?

1099


What do you mean by Recursion Function?

1133


What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?

1450


Why can't I perform arithmetic on a void* pointer?

1108


What are the similarities between c and c++?

1085