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

Where You Can Use Interface in your Project

1423


What is destructor oops?

619


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


When not to use object oriented programming?

567


what is the drawback of classical methods in oops?

2918






What is the problem with multiple inheritance?

583


How do you achieve runtime polymorphism?

569


What is super in oop?

595


officer say me - i am offered to a smoking , then what can you say

1578


What is a class in oop?

599


assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).

1662


What is the real life example of polymorphism?

605


What does <> mean pseudocode?

620


class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash

1696


Which type does string inherit from?

614