Write a macro for swapping integers

Answer Posted / deepak

# define swap(a,b) a = a + b; b = a - b; a = a - b;

Is This Answer Correct ?    50 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is difference between class template and template class?

2157


Why is object oriented programming so hard?

616


Why is oop better than procedural?

602


any one please tell me the purpose of operator overloading

1965


Where You Can Use Interface in your Project

1423






What is a superclass in oop?

665


What is stream in oop?

837


What is oops concept with example?

574


What is abstract class in oops?

598


What is polymorphism give a real life example?

557


What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }

1981


What is an advantage of polymorphism?

589


What is class and example?

567


What is static modifier?

630


What is the benefit of oop?

570