Write a macro for swapping integers

Answer Posted / raku

#define SWAP(a,b) a=a+b-(b=a)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is overloading in oop?

577


Why is object oriented programming so hard?

616


What is encapsulation in oop?

609


Which language is not a true object oriented programming language?

646


How does polymorphism work?

635






What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?

1653


Where is pseudocode used?

566


What is difference between pop and oop?

609


Get me a number puzzle game-program

1694


Can destructor be overloaded?

601


write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.

1795


What are the important components of cohesion?

557


What is encapsulation and abstraction? How are they implemented in C++?

637


What is object and class in oops?

589


c++ program to swap the objects of two different classes

1766