how to swap two numbers with out using temp variable
Answer Posted / pranav
//swaping of 2 numbers without using temp variable
//a=5 & b=6
a=a+b; //a=30
b=a-b; //b=5
a=a-b; //a=6
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is private, public and protected inheritance?
Can we define a constructor as virtual in c++?
Explain how overloading takes place in c++?
Explain linked list using c++ with an example?
How come you find out if a linked-list is a cycle or not?
How does c++ structure differ from c++ class?
What are static variables?
How do I start a c++ project?
What is c++ used for in games?
What are disadvantages of pointers?
When should I use unitbuf flag?
What is operators in c++?
If there are two catch statements, one for base and one for derived, which should come first?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create
How do I download c++?