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;
}



what is the purpose of the following code, and is there any problem with the code? void fn(long..

Answer / senthil

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

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More C Interview Questions

What's wrong with "char *p; *p = malloc(10);"?

5 Answers  


How can I find out how much free space is available on disk?

0 Answers  


Why we use int main and void main?

0 Answers  


Explain the differences between public, protected, private and internal.

2 Answers  


How can I remove the leading spaces from a string?

0 Answers  


What is pointer to pointer in c?

0 Answers  


What are the application of c?

0 Answers  


What library is sizeof in c?

0 Answers  


write a progam to display the factors of a given number and disply how many prime numbers are there?

2 Answers  


What is the advantage of an array over individual variables?

0 Answers  


wat is output of the following int main() { const int j=2; int i; switch(i) { case 1:break; case j:break; default:break; } }

2 Answers  


program for comparing 2 strings without strcmp()

4 Answers  


Categories