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...

swap two number wthout using third variable

Answer Posted / ashutosh tiwari

void swap_num(int *a, int *b)
{
*a = *a+*b; *b = *a-*b; *a = *a-*b;
}
or
void swap_num(int *a,int *b)
{
*a = *a^*b; *b = *a^*b; *a = *a^*b;
}

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

which book we learned this mantis? how many version are realsed this mantis upto now?

1954


Given an array all of whose elements are positive numbers, find the maximum sum of a subsequence with the constraint that no 2 numbers in the sequence should be adjacent in the array. So 3 2 7 10 should return 13 (sum of 3 and 10) or 3 2 5 10 7 should return 15 (sum of 3, 5 and 7)

1179


when a query is made on Logical file in DB2/400, will the records satisfying select/omit criterion be fetched from all members of physical file or only the member with same name as physical file?

2124


Diff between IF and where ?

2046


Suppose server object is not loaded into the memory, and the client request for it , what will happen?

2661


where is available in this mantis toturials?

2128


what is adodb??y it is used for connection of V.B and access??what is ado?dao?

2191


write the a cl program with the following specification A. Accept 2 parameters-date and date type B. if date type is J then convert date to *MDY format C. if date type is M convert date to *JUL format 4.send a program message with the value of converted date Please explain for each with coding?

2630


what is difference between kpo and it industry? that is in terms of work, package etc

2019


what are stubs related to foxpro?

2092


WHAT IS MAIN IMPORTANT THING IN SOFTWARE?

2298


Hi can you please send me recent(present) interview questions and technical qyestions with answers for "BUSSIESS OBJECTS" and "DATA WAREHOUSE".pls its urgent for me my mail id is sekhar.cs82@gmail.com,manjuforgis@gmail.com. thanks in advance

2115


hi viewers, tell me,what is scripting and programming, define and difference...pls

1976


How will you prove that java swing is multithreaded?

2290


what is the use MDM(Master Data Management)and meaning

2415