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

what is the purpose of the following code, and is there any
problem with the code?

void fn(long* p1, long* p2)
{ register int x = *p1;
register int y = *p2;
x ^= y;
y ^= x;
x ^= y;
*p1 = x;
*p2 = y;
}

Answer Posted / senthil

exchanges "long data type" values referenced by pointers p1 and p2

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)

2337


Explain the advantages of using macro in c language?

1045


exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above

1178


Explain the difference between call by value and call by reference in c language?

1158


Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10

15888


Explain what is the concatenation operator?

1230


Explain how does free() know explain how much memory to release?

1134


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

1298


what is the difference between 123 and 0123 in c?

1276


How is a pointer variable declared?

1158


Explain what are reserved words?

1158


Is c easier than java?

1124


What are register variables? What are the advantage of using register variables?

1229


Explain how can I right-justify a string?

1091


the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above

1304