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

Difference between HTML and DHTML?

2117


what is the software to run the GSM gate opener program

2152


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

2476


Explain three modes in which files can be accessed from python program

1720


how do i add a column dynamically in a table by using java application?

1969


can we extend a class having only one parameterised constructor.Suggest the process to do it.

2459


what is c sharp dotnet

2212


Have you used callsymputx? what points need to be kept in mind when using it?

1925


Need guidewire related Documents(Interview Question/Tips/Best Practice/Dumps)

553


You are given a dictionary of all valid words. You have the following 3 operations permitted on a word: delete a character, insert a character, replace a character. Now given two words - word1 and word2 - find the minimum number of steps required to convert word1 to word2. (one operation counts as 1 step.)

1021


< DL Compact > tag is used for

1912


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?

2590


Delta 5 weight scale not connect with oracle application what i can do?

2267


Suppose we are doing 4 operations on database using service, first operation is successful but due to some reason remaining 3 operations are failed. I) is this transaction successful or not? ii) How can you give that error message to user?

1911


What is autocall macro and how to create autocall macro? what is the use of it?

1986