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 difference between scanf and gets?
Is stack a keyword in c?
Is c procedural or functional?
write a program to print largest number of each row of a 2D array
What does return 1 means in c?
Why can’t we compare structures?
What is the role of this pointer?
When can you use a pointer with a function?
What is an array in c?
Explain how do you list a file’s date and time?
Explain what is the difference between a string and an array?
What are dangling pointers in c?
Can stdout be forced to print somewhere other than the screen?
What is the right way to use errno?
What is a nested loop?