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

Which function in C can be used to append a string to another string?

1177


What does int main () mean?

959


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

1173


C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions

1002


Which is more efficient, a switch statement or an if else chain?

969


How can I implement a delay, or time a users response, with sub-second resolution?

1033


define string ?

1057


What is uint8 in c?

1055


When is a null pointer used?

1062


What are the types of unary operators?

1128


printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions

1096


Does c have function or method?

943


how to capitalise first letter of each word in a given string?

1871


How do you list a file’s date and time?

1021


What is the difference between declaring a variable by constant keyword and #define ing that variable?

3285