write a program to swap Two numbers without using temp variable.
Answer Posted / dhruv
I am not giving an answer, but just wanted to point out that
most of the solutions which try to add (a+b) and then
subtract from it will not work if (a+b) exceeds the maximum
value an int can hold.
So even if it looks good on paper it will give erroneous
results when run on a machine
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is equivalent to ++i+++j?
Is array a primitive data type in c?
What is use of integral promotions in c?
How can I recover the file name given an open stream?
What are type modifiers in c?
How are pointers declared in c?
Is fortran still used today?
In C language what is a 'dangling pointer'?
List the difference between a While & Do While loops?
What are the advantages and disadvantages of a heap?
what is the diffrenet bettwen HTTP and internet protocol
What is the purpose of the preprocessor directive error?
Explain the red-black trees?
What is the function of this pointer?
Which function in C can be used to append a string to another string?