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
How can I read/write structures from/to data files?
Differentiate between static and dynamic modeling.
What are global variables and explain how do you declare them?
Can we access array using pointer in c language?
What is the right type to use for boolean values in c? Is there a standard type?
What is c system32 taskhostw exe?
What does the function toupper() do?
exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above
Explain spaghetti programming?
What would be an example of a structure analogous to structure c?
Tell me the use of bit field in c language?
Is array a primitive data type in c?
How was c created?
Explain how can you tell whether a program was compiled using c versus c++?
Can you mix old-style and new-style function syntax?