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

swapping of two numbers without using third variable using
AND and OR operators

Answer Posted / ramesh reddy

a = a^b; b =a^b; a =a^b;
or
a=a+b; b=a-b; a=a-b;

Is This Answer Correct ?    43 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain indirection?

1147


Why is %d used in c?

1008


What does %d do?

1286


What is use of pointer?

1094


Explain what is gets() function?

1085


int i=3; this declaration tells the C compiler to a) reserve space in memory to hold the integer value b) associate the name i with this memory location c) store the value 3 at this location d) all the above

1309


int far *near * p; means

3562


How can I ensure that integer arithmetic doesnt overflow?

1177


With the help of using classes, write a program to add two numbers.

1045


Explain what are linked list?

1050


How can I insert or delete a line (or record) in the middle of a file?

1022


What are pointers really good for, anyway?

1067


Is c pass by value or reference?

1049


write a program to find the given number is prime or not

4775


What are the advantages of using new operator as compared to the function malloc ()?

1354