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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / abhishek karnani

int a=10,b=5;

a=a+b-(b=a);

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More C Interview Questions

How can I check whether a file exists? I want to warn the user if a requested input file is missing.

0 Answers  


Write a program to know whether the input number is an armstrong number.

0 Answers   Wipro,


What are bit fields? What is their use?

2 Answers   Adobe,


How can a process change an environment variable in its caller?

0 Answers  


What does the error message "DGROUP exceeds 64K" mean?

0 Answers   Celstream,


What is malloc() function?

0 Answers  


write a c program to print a given number as odd or even without using loop statements,(no if ,while etc)

10 Answers  


Is Exception handling possible in c language?

0 Answers   Wipro,


What is a volatile keyword in c?

0 Answers  


could u able to tell about suresoft technical session

1 Answers  


What is the function of this pointer?

0 Answers   Agilent, ZS Associates,


What is the process to create increment and decrement stamen in c?

0 Answers  


Categories