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 temporary
variable?

Answer Posted / sam

let a and b be variables
a^=b^=a^=b;
by performing this logic from right hand side we can swap
two variables

Is This Answer Correct ?    6 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are the variables argc and argv are local to main?

1326


Explain a pre-processor and its advantages.

1145


What does %d do in c?

969


What is getch () for?

1250


Not all reserved words are written in lowercase. TRUE or FALSE?

1239


Is a house a shell structure?

1174


What is the 'named constructor idiom'?

1108


How can I write functions that take a variable number of arguments?

1142


any "C" function by default returns an a) int value b) float value c) char value d) a & b

1094


What is null pointer constant?

1180


How can I list all of the predefined identifiers?

987


Is file a keyword in c?

941


Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

1106


Explain 'bit masking'?

1096


Explain the term printf() and scanf() used in c language?

1059