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

How to swap values between two variables without using a
third variable?

Answer Posted / siva

You can also do it with the exclusive or bitwise operator...
a = a ^ b;
b = a ^ b; ((a ^ b) ^ b == a)
a = a ^ b; ((a ^ b) ^ a == b)

Is This Answer Correct ?    27 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

1.what is the vesition managment.

2198


Given an array of size n. It contains numbers in the range 1 to n. Each number is present at least once except for 1 number. Find the missing number

1162


I m new to the dbms. Recently i came across words clustered indexes & nonclustered indexes but i dont know what is this all about & whats the difference between them.. So please help me!!!!!!!!

1981


what is technical system, business system, logical system in sap pi7.0

2596


what is the diffrence between software and hardware language?

2343


Which language they use during interview?

1996


What is the purpose of element of in Ajax

2481


Explain what is OOPS and its concepts?

1131


WS-NUM PIC S9(05)V(02) SIGN TRAILING SEPARATE MOVE '0050000+' TO WS-NUM The value stored is 00500,00+ MOVE '0050000-' TO WS-NUM Then what is the value will be stored in WS-NUM? Am getting '-00500,00'.....>>> What should I declare to WS-NUM so that I can get correct values for both + & - signs.

2381


I am looking for NIC Sample papers or any patern of questions/ syllabus plz, send me on hamid.khan135@yahoo.in Regard

1979


what is difference between input parameter and output parameter.

4852


Explain the difference between an expert and a novice user. How would your strategy for designing user interfaces for an expert user differ from that for designing user interfaces for a novice user.

3059


How to create a new dataset only duplicate observations in proc sort procedure?

2020


how pseudo column works?

2200


what is dot net framework

2838