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 does the ios::ate argument do?
Explain the properties and principles of oop.
How to declare an array of pointers to integer?
Is c++ high level programming language?
Explain about Virtual Function in C++?
How can you link a c++ program to c functions?
program explaining feautures of c++
What is an incomplete type in c++?
What is the difference between a reference and a pointer?
What is a hashmap c++?
Of the numbers 12 23 9 28 which would be at the top of a properly implemented maxheap a) 28 b) 9 c) Any of them could be
Is arr and &arr are same expression for an array?
Why was c++ made?
Can a new be used in place of old mallocq? If yes, why?
How would you use the functions sin(), pow(), sqrt()?