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 / banti sharma

Miss Sobha upto My Knowlegde the answer of "Shiv" was most
appropriate and if you have Any knowledge of Programming I
repeat again "Any knowledge of programming" then you may
find it out yourself that Bitwise Shift Operation is much
more time Efficient then that of "+","-","*","/.And if I say
about my answer then it is also correct having No mistakes
as the Question is "How to swap values between two variables
without using a third variable?" so if you read it carefully
then it does not say anywhere to print the Swaped values.I
think you have got Y i wrote like that,IF I say about
another logic then one more logic may be used like:

a=a*b;
b=a/b;
a=a/b;

though I m using Multiply and Devision still its better then
my past logic(so better then urs aytomatically) now if You
may find y? multiplication/Devision is more efficient then
Plus/minus then Do Googling.
have a good day

Is This Answer Correct ?    7 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

sample and simple coding where we get?

2296


I m new to the dbms. Recently i came across words clustered indexes & nonclustered indexes but i dont know what is this all about & whats the difference between them.. So please help me!!!!!!!!

1980


Hey this is venkatesh.Please can any body tell me what is SFLNXTCHG?where we use this keyword?what perpuse we use this?Can you tell me in real time senario with example? And in 7 specification(RPG/400)what is the mandatory specification using programs?

2122


write algo for cobol program whichuse three flat file to extract some specific information 8 marks mainframe

2012


ok how would i do the following extract from a file i have ssns = 267907230 which are in column 7 into a separate data set then create a 2nd job step to extract from the data set created the following "fund code" which is in column 31 and is 113 into yet another data set

2007


How does the type system works when there is interoperability between a COM and .Net, i mean what exactly happens there

2107


Write a shell program to test whether a given year is leap year or not ?

2687


Difference between views and index in sas programming

1529


Any real time example of O2C process from taking order till creating invoice.

2380


qtp 9.2 14 days demo version was expired.I uninstalled how to reinstall this again

2789


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

2061


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

2203


Tell me the jobs for the MCA Fresher in delhi, Noida..

2396


Need provab technical test questions

2849


Is buffer size and file block size is similar? If similar,at which case it will be same size?

2182