Write a macro for swapping integers

Answer Posted / sun

#define SWAP(a,b) (a^=b^=a^=b;)

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is inheritance and how many types of inheritance?

615


Can you inherit a private class?

631


What is difference between abstraction and encapsulation?

592


Can destructor be overloaded?

594


write a program to find 2^n+1 ?

1546






What does sksksk mean in text slang?

1532


What is oops concept with example?

574


What is new keyword in oops?

589


What is the fundamental idea of oop?

634


Which is better struts or spring?

616


Why do we use class in oops?

553


What are the advantages of polymorphism?

573


What do you mean by variable?

572


Are polymorphisms mutations?

696


Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.

2006