how to swap two numbers with out using temp variable
Answer Posted / raja
if a=10& b=20
a=a+b //a=30
b=a-b //b=10
a=a-b //a=20
finally we got a=20,b=10
| Is This Answer Correct ? | 10 Yes | 3 No |
Post New Answer View All Answers
How java is different from c and c++?
What is atoi in c++?
What is class definition in c++ ?
If you don’t declare a return value, what type of return value is assumed?
What is vector processing?
Can you please explain the difference between overloading and overriding?
What is lazy initialization in c++?
What are associate containers?
Write is a binary search tree? Write an algo and tell complexity?
Can we declare a base-class destructor as virtual?
What is a try block?
What happens if a pointer is deleted twice?
What is the difference between while and do while loop? Explain with examples.
What is data abstraction? How is it different from data encapsulation?
What is c++ 11 and c++ 14?