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

through which algorithm does the garbage collector works? how the garbage collector will understand that the object will going to be deleted?

2538


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

2407


what is integration testing in real time applications?

2412


If u need any fake experience certificate in software side, contact me at: vikramyadhav@gmail.com

8341


i am getting the error while compiling my cics program with including db2 dclgen member it is showing that ur dclgen member not including and all the host variables are undeclared

1671


How to use string functions in QTP?give some examples

7927


Differevce between arrays and array builders?

2153


Which CRM is better to opt, Sebiel CRM or Salesforce CRM or sap CRM? which institute is best one in hyderabad

2305


HOW TO FIND NUMBER OF TWOS IN N!(N FACTORIAL)??

2290


Which design patterns have you used?

2019


in teradata level primary in table level allows duplicates why?

2109


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

2440


Difference between debugging, running, executing of an application

4064


Describe the difference between Interface-oriented, Object-oriented and Aspect-oriented programming

11980


What is ur porject Architecture? If anyone ask what i have to specify here..

1971