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

How do you use a 'Local Block'?

1173


Is c call by value?

1021


How can I send mail from within a c program?

1032


Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?

1052


Is multithreading possible in c?

1011


Explain what is the benefit of using enum to declare a constant?

1083


What is indirection?

1095


What is hashing in c?

1165


Why isn't it being handled properly?

1067


Which of the following operators is incorrect and why? ( >=, <=, <>, ==)

1168


Which is better oop or procedural?

1069


Explain the use of keyword 'register' with respect to variables.

1052


what is ur strangth & weekness

2431


Explain how can a program be made to print the line number where an error occurs?

1214


What are the application of void data type in c?

1191