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
WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..
Where does the name "C" come from, anyway?
Why c is a mother language?
What is the significance of scope resolution operator?
what is different between auto and local static? why should we use local static?
Write a program to print "hello world" without using a semicolon?
What is array of structure in c?
Does free set pointer to null?
c program to compute AREA under integral
What are the restrictions of a modulus operator?
What is structure in c language?
What are the different types of pointers used in c language?
Are the expressions * ptr ++ and ++ * ptr same?
What is a string?
How can I make it pause before closing the program output window?