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
What is the difference between encapsulation and polymorphism?
What is oops and why we use oops?
any one please tell me the purpose of operator overloading
What is an example of genetic polymorphism?
What is difference between pop and oop?
What is advantage of inheritance?
What do you mean by overloading?
What is object-oriented programming? Webopedia definition
What polymorphism means?
write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).
Get me a number puzzle game-program
What is polymorphism what is it for and how is it used?
What is destructor in oop?
What is abstract class in oop?
What is a class and object?