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
sample and simple coding where we get?
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!!!!!!!!
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?
write algo for cobol program whichuse three flat file to extract some specific information 8 marks mainframe
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
How does the type system works when there is interoperability between a COM and .Net, i mean what exactly happens there
Write a shell program to test whether a given year is leap year or not ?
Difference between views and index in sas programming
Any real time example of O2C process from taking order till creating invoice.
qtp 9.2 14 days demo version was expired.I uninstalled how to reinstall this again
What is autocall macro and how to create autocall macro? what is the use of it?
Find out the list of authorization objects which contains activity as a field? Thanks in advance.
Tell me the jobs for the MCA Fresher in delhi, Noida..
Need provab technical test questions
Is buffer size and file block size is similar? If similar,at which case it will be same size?