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
For a binary tree with n nodes, How many nodes are there which has got both a parent and a child?
What is web.configuration? how is it work? & wht is use this?
Which language they use during interview?
what is adodb??y it is used for connection of V.B and access??what is ado?dao?
Hi All, Can any one please send me the difference between informatica 7i and 8i versions, Thanks in advance. vinod
Need guidewire related Documents(Interview Question/Tips/Best Practice/Dumps)
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?
hi this is uday i want prepare for nic exam if any one have previous question papers please send me or atlest guide me how to prepare my ID is udaykiran4u@in.com
Write a program to create a process in UNIX
is it acceptable if we declare multiple exceptions in same overridden method.
i am exeprienced person what is selection process
if 3 duplicate records, by keeping one original and one duplicate record, and how to delete remaining 2 duplicates in sql server 2008
in network security,how we identified threat?some one say we found threat according to it's signature,but how we get signature or pattern of the virus?
THE CHANNEL IN DATA COMMUNICATION CAN BE?
hii I inntrested abt scjp certification but i dont knw abt scjp plz send details abt scjp exam and syllabus.