Answer Posted / venkanna
swap(a,b);
{
a=a+b;
b=a-b;
a=a-b;
}
Explenation:
if a=5 and b=10
a=a+b(5+10)=15
b=a-b(15-10)=5------------swaped here
a=a-b(15-5)=10------------
| Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
Is oop better than procedural?
What is debug class?what is trace class? What differences are between them? With examples.
How is polymorphism achieved?
officer say me - i am offered to a smoking , then what can you say
What is object in oop with example?
What is the types of inheritance?
How can you overcome the diamond problem in inheritance?
What is an example of genetic polymorphism?
Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.
Why is it so that we can have virtual constructors but we cannot have virtual destructors?
What are constructors in oop?
What is a superclass in oop?
What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?
What is oops in simple words?
What is oops concept with example?