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
Why is abstraction needed?
What is pure oop?
What is an advantage of polymorphism?
What is the real time example of encapsulation?
Templates mean
What is oops and why we use oops?
What is the main feature of oop?
Where is pseudocode used?
What is polymorphism in oops with example?
How does polymorphism work?
What is methods in oop?
What is protected in oop?
What is difference between inheritance and polymorphism?
What is a class oop?
What are oops methods?