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
Which bit wise operator is suitable for putting on a particular bit in a number?
write asingle linked list which read from two list & the do the following 1 sort the prime & nonprime num (prime should be less tn nonprime) 2 each node has a prime num followd by nonprime 3 add a new node into its sutable plce 4 erase the most three duplicated non prime num 5 find the least duplicated prime num
What is string in c++ programming?
Give an example of run-time polymorphism/virtual functions.
What does getch() do according to the ANSI C++ standard a) Reads in a character b) Checks the keyboard buffer c) Nothing in particular (Its not defined there)
Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11) y=2*x;
What is const pointer and const reference?
What is near, far and huge pointers? How many bytes are occupied by them?
Define friend function.
How does a C++ structure differ from a C++ class?
What can I safely assume about the initial values of variables which are not explicitly initialized?
Explain the volatile and mutable keywords.
Can you please explain the difference between using macro and inline functions?
What is the best free c++ compiler for windows?
What is virtual methods?