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

How to set on/off a group of indicators in a single statement?

1803


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

1024


1. Write a program to create a sentence at runtime and count number of vowels in it ? 2. Write a program to get a string and to convert the 1st letter of it to uppercase ?

3629


what is client server & server? What r types of Joins? explsin it! which types of indexex in sql server? what is triggers?

1986


how many types of operating system are avaliable?

2279


why not instantiating servet using new operator?

1913


Explain what is OOPS and its concepts?

1063


how do find the user exit for selected feild whatis the process and can u plz explain it

2107


I need source code for Enrollment System using Visual Basic 6.0/2008 database MS Access 2007 for my school thesis project...please help me..kindly send in my email jpinedamcp@gmail.com

1991


how CLR identify vb file?

2982


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

1938


iam confused among testing ,.net and java. can anybody help me.

1959


how sap is different from other software ?

2124


what is difference between kpo and it industry? that is in terms of work, package etc

1931


WHat is execution in manual testing and when will we start execution and what language we use in execution

1890