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

wat are the two methods for swapping two numbers without
using temp variable??

Answer Posted / shrikantauti

i dont know the methods but can give the code to swap values without temporary variable.
a b
a=a+b
b=a-b
a=a-b

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does %c mean in c?

1142


what is stack , heap ,code segment,and data segment

2770


What is the difference between near, far and huge pointers?

1159


while initialization of array why we use a[][2] why not a[2][]...?

2404


Explain what is the benefit of using const for declaring constants?

1090


A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream

1240


When is a void pointer used?

1314


What is the right type to use for boolean values in c?

1087


Where does the name "C" come from, anyway?

1216


formula to convert 2500mmh2o into m3/hr

1051


What is difference between union and structure in c?

1247


How do I get a null pointer in my programs?

1166


If I have a char * variable pointing to the name of a function ..

1231


i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none

1125


Is that possible to add pointers to each other?

1429