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 2 variables without using a temp variable

Answers were Sorted based on User's Feedback



Swap 2 variables without using a temp variable..

Answer / guest

a,b
a=a+b
b=a-b
a=a-b

Is This Answer Correct ?    21 Yes 0 No

Swap 2 variables without using a temp variable..

Answer / sheetal

if a=5 and b=3 are two variables, then add them i e
a=a+b; a=8
b=a-b; b=5
a=a-b; a=3

Is This Answer Correct ?    12 Yes 0 No

Swap 2 variables without using a temp variable..

Answer / mfsi_satyakamm

int x,y;
x=x+y;
y=x-y;
x=x-y;

Is This Answer Correct ?    12 Yes 1 No

Swap 2 variables without using a temp variable..

Answer / s n

try this one line swaping of two variables


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

Is This Answer Correct ?    3 Yes 5 No

Post New Answer

More Manual Testing Interview Questions

Can anyone tell me what is meant by "Mainframes Testing"? Also, Plz let me know what r all d responsibilities of a Manual Tester in Mainframes Testing? Plzzz reply!!

14 Answers   Accenture, American Express, Cap Gemini, Google, IBM,


What is bug life cycle?

2 Answers  


can you tell me how to write test cases from use case?

1 Answers  


when to start and stop testing?

2 Answers  


who do the sanity and smoke please explain me at what time this type of testing will do

2 Answers  


How will confirm the Test Cases are passed?

7 Answers   PetroChina, RTG,


how we send mobile applications software to mobile device ? how outlook express interacts with mobile software? any body pls tell me this answer?

2 Answers  


You have a testing team of 10 members, and now you have to reduce it by 5 member and you dont want to increase risk in your product, you are try to cover all functionality to test. What test Strategy you follow.

0 Answers  


What's Web-Enabled Application Measurement Tests

1 Answers   Crea,


What do you like about Windows?

2 Answers  


How will you prepare Test plan. What are the techniques involved in preparing the Test plan.

2 Answers   IBM, Wipro,


Hello! can anyone explain IN DETAILS what is API??? thank you!

2 Answers  


Categories