How do we swap or interchange any 2 numbers without using
Temporary variable...Anybody can pls answer it.. Thanks in
Advance
Answer Posted / raghuram.a
int x,y;
x =x-y;
y =y+x;
x =y-x;
or
int x,y;
x=x^y;
y=x^y;
x=x^y;
| Is This Answer Correct ? | 11 Yes | 7 No |
Post New Answer View All Answers
What is header file in c?
what is the function of pragma directive in c?
What is build process in c?
Explain which function in c can be used to append a string to another string?
Explain high-order bytes.
what is recursion in C
Explain the properties of union. What is the size of a union variable
What are the functions to open and close file in c language?
Why is sprintf unsafe?
Write a code to remove duplicates in a string.
What is the condition that is applied with ?: Operator?
Give me the code of in-order recursive and non-recursive.
What is difference between function overloading and operator overloading?
What is meant by operator precedence?
Write a program of advanced Fibonacci series.