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
What should main() return in c and c++?
Differentiate between an external iterator and an internal iterator?
How the memory management in vectors are being done. What happens when the heap memory is full, and how do you handle it ?
What is name hiding in c++?
What is the best book for c++ beginners?
What is data types c++?
What does h mean in maths?
What is a multiset c++?
What is the difference between global int and static int declaration?
What is iostream in c++ used for?
Can user-defined object be declared as static data member of another class?
program explaining feautures of c++
What is the difference between an external iterator and an internal iterator? Describe an advantage of the external iterator.
What function initalizes variables in a class: a) Destructor b) Constitutor c) Constructor
Which operator cannot be overloaded c++?