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

Plz sent me in .net 2.0 interview Question & answers?

2086


If i have a dataset queried from Sql and I would like to insert the dataset into a specific node in an xml document how do I do this

2076


In JCl , we have COND parameter.This holds comparison code and condition.It also has only and even parameters. ex: COND((4,GE),EVEN).what the comma mean here. is that 'and' or 'or'.

2227


what are all the validation we need to perform in data stage?

2356


code for connection from windows forms to sql server

2176


what is the software to run the GSM gate opener program

2155


Tag for turning an image into a hyperlink is

2228


Find out the list of authorization objects which contains activity as a field? Thanks in advance.

2144


What binary value will be internally stored for NULL for the type S9(1) COMP 3 in mainframe

1929


In project we have Documentation phase also,in that what is micro and macro designing?

1808


What is WEB 3.0? What are the features their in WEB3.0

2061


if 3 duplicate records, by keeping one original and one duplicate record, and how to delete remaining 2 duplicates in sql server 2008

2100


In an customer exit (include Z) program, only the last record is getting fetched. The exit is getting called after pressing save button. What to write for fetching the first record ? Before saved to a SAP table how can i call all these records in an itab in the exit ?

1917


Given a Binary Search Tree, write a program to print the kth smallest element without using any static/global variable. You can?t pass the value k to any function also.

928


I am work in it aompenei

1391