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 / abhi

void swap(int *a,int *b)
{
if(*a == *b)
return;
*a^=*b;
*b^=*a;
*a^=*b;
}

Is This Answer Correct ?    461 Yes 195 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are local static variables? How can you use them?

1153


Can static variables be declared in a header file?

1062


What are different types of variables in c?

1080


Explain why can’t constant values be used to define an array’s initial size?

1358


What does 3 mean in texting?

1104


Why do we need volatile in c?

1178


What are the advantages of using new operator as compared to the function malloc ()?

1352


how to count no of words,characters,lines in a paragraph.

4432


write a c program for swapping two strings using pointer

2638


Can you apply link and association interchangeably?

1125


What is main () in c?

1078


What is file in c preprocessor?

1154


Why C language is a procedural language?

1042


Why is event driven programming or procedural programming, better within specific scenario?

2437


What is the explanation for modular programming?

1217