how to swap two numbers with out using temp variable
Answer Posted / vaibhav meena
Its simple:
For Integer Values
A^=B^=A
and with arithmetic operators :
All the above answers are right
Is This Answer Correct ? | 7 Yes | 3 No |
Post New Answer View All Answers
What does new do in c++?
Are strings immutable in c++?
Write a program using GUI concept for the scheduling algorithms in Operating system like SJF,FCFS etc..
What does catch(…) mean?
Can char be a number c++?
What are the two types of comments?
What are static type checking?
what is Loop function? What are different types of Loops?
What is null pointer and void pointer?
What is the header file for setw?
Why is c++ difficult?
In what situations do you have to use initialization list rather than assignment in constructors?
Draw a flow chart and write a program for the difference between the sum of elements with odd and even numbers. Two dimensional array.
What do you mean by persistent and non persistent objects?
What are references in c++?