swap two integer variables without using a third temporary
variable?

Answer Posted / vignesh1988i

the best way what i choose is that : if x=89 , y=-88

x^=y^=x^=y;

this line will swap the above numbers......


thank u

Is This Answer Correct ?    10 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a char c?

580


Difference between exit() and _exit() function?

645


What is function definition in c?

570


What is operator promotion?

615


What is the difference between malloc() and calloc()?

607






Explain how can a program be made to print the name of a source file where an error occurs?

667


What is quick sort in c?

571


List some basic data types in c?

547


Discuss the function of conditional operator, size of operator and comma operator with examples.

666


What is an lvalue in c?

684


What is pre-emptive data structure and explain it with example?

3194


How can I find out the size of a file, prior to reading it in?

608


Why & is used in c?

696


Are there constructors in c?

577


What is clrscr in c?

658