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 meant by beta testing?

4 Answers  


wat is build duration

1 Answers   CTS,


In front end if you enter one record it will be inserted in to 20 tables in back end.so How you are going to test in Manually whether data is going properly in to concern data tables or not? Is there any better solution to do that instead of opening the table and checking individually?

4 Answers  


how do we know our perticular task is compltely tested or not

2 Answers  


who will prepare tracebility matrix?

2 Answers  


Describe Software Testing life cycle? What are the steps in volved in STLC (Software Testing Life Cycle)?

22 Answers   MBT,


Hi can anyone give me 5 situations where your developerignore your bug

5 Answers  


Hi, Please give me brief explination about agile methodology.

2 Answers  


what is v-model and explan with diagramm

0 Answers   Cap Gemini,


What can be done if requirements are changing continuously?

5 Answers   Oracle,


according 2 an company or TL,how can a tester can prepare POSITIVE & NEGATIVE test cases ??

2 Answers   Valtech,


This is a interview question i faced? Suppose your client doesnt have any idea abt software or the technology ?then how

3 Answers  


Categories