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
Are vectors faster than arrays?
Who calls main function?
How would you implement a substr() function that extracts a sub string from a given string?
What is the hardest coding language to learn?
Can you overload the operator+ for short integers?
Why c++ does not have finally?
How much do coding jobs pay?
Is atoi safe?
What is c++ used for in games?
How is c++ used in the real world?
How do you traverse a btree in backward in-order?
How does class accomplish data hiding in c++?
Why pointer is used in c++?
What is object in c++ wikipedia?
Reverse the Linked List. Input: 1->2->3->4->5->NULL Output: 5->4->3->2->1->NULL