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

write a program to swap Two numbers without using temp variable.

Answer Posted / sur!

void xorSwap (int *x, int *y) {
if (x != y) {
*x ^= *y;
*y ^= *x;
*x ^= *y;
}
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are pointers? What are different types of pointers?

1092


Why c language is called c?

972


Why is c so important?

1020


What is pointers in c?

1081


What is a scope resolution operator in c?

1230


What are the types of pointers in c?

993


List some of the dynamic data structures in C?

1216


Do you know the difference between exit() and _exit() function in c?

1037


What is a void pointer in c?

1068


What are the advantages of external class?

1028


What is the purpose of scanf() and printf() functions?

1204


What does %d do in c?

930


what is a constant pointer in C

1116


What is the difference between c &c++?

1114


if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0

1910