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

How to swap values between two variables without using a
third variable?

Answer Posted / pushpendra

int x=10,y=20;
x=x+y (10+20=30)
y=x-y (30-20=10)
x=x-y (30-10=20)

x=20,y=10
x and y vales are swaped.

Is This Answer Correct ?    13 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is web configuration file

2038


Explain polymorphism. Provide an example.

999


how to add a new table with variables and thier values into a imported file uisng proc import?

1882


What is BASIS

2151


In mainframe SDSF, Can we copy the list of jobs currently executing in SDSF in to a seperate DATASET...?

2254


What's the difference b/w Table & Templete in Smartform?

2200


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

2638


i want to improve my english vocab for racking campus written exam plz tell me best book for prepration......

2137


sample code for data transfer between two r/2 systems and r/3 systems?

1926


Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fit" instead of the number and for the multiples of five print "Bit". For numbers which are multiples of both three and five print "FitBit".

2363


how to check single or double byte in struts

1967


Compare any 4 software development life cycle paradigms with each other. Indicate at least one application for each of the paradigms that are suitable to developed using that paradigm.

2795


why we use mantis? what u mean mantis in IT trends? addvantages of mantis?

2189


Outline the two important features of a terminating recursion. Any ideas?

2189


why we use abstract in awt?

1987