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

What is Gap Analysis?. Is there any template for it.Describe briefly about Gap Analysis Please

1 Answers  


I am pranu(frm hyderabad) new commer for this site? I have some doubt's pls clarify it..... I finished my B.Tech 2003 pased out(ECE),(pranati_434@yahoo.co.in) and S/w Testing Course Now iam serarching a job in Testing, I did not have any experience in real time projects. Any body can send me the sample Testcases,Srs,Matrix for Banking,ERP Projects etc.,. 3.5 yrs gap , consultancy..,

2 Answers  


what is cmmlevel each and everystage i want to complete details please any one mail me i want to complete details

4 Answers   CGCI,


what is the steps for preparing scenario ?

3 Answers  


For Web Applications what type of tests r u going to do .. tell me the Importent ones..

9 Answers   Infeneon Technologies,


Write test cases for checking date field?

1 Answers   Wipro,


what is use case diagram?

5 Answers   KTS,


How do we validate cerdit cards in billing project

2 Answers   HCL,


what is the diff b/s test plan, test strategy and test procedure?

3 Answers  


Can any one tell me how SRS ,BRS documents are made?Also,what are the documents to be referred through out the SDLC and TESTING phase?

3 Answers   AppLabs,


what is scalability testing

2 Answers   Accenture,


When you found a bug and reports it to the developer but the developer is least bothered and he does not accept that bug what will u do?

0 Answers  


Categories