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 a loop? What are different types of loops in c++?
Reads in the size of a square from the screen; 2. Prints a hollow square of that size out of “-“, “|” and blanks on screen; 3. Prints the same hollow square onto a text file. Your program should work for squares of all side sizes between 1 and 20. --- │ │ │ │ │ │ ---
Do vectors start at 0?
What do you mean by ‘void’ return type?
find the two largest values among the 6 numbers using control structures : do-while,for,if else,nestedif- else ,while. one or two of them.
How to declaring variables in c++?
How does work in c++?
Out of fgets() and gets() which function is safe to use?
what are the iterator and generic algorithms.
Why c++ is not a pure oop language?
Describe public access specifiers?
What is the purpose of the "delete" operator?
What is the iunknown interface?
Why c++ does not have finally?
What type of question are asked in GE code writing test based on c++ data structures and pointers?