Write a macro for swapping integers
Answers were Sorted based on User's Feedback
Answer / deepak
# define swap(a,b) a = a + b; b = a - b; a = a - b;
Is This Answer Correct ? | 50 Yes | 8 No |
When a private constructer is being inherited from one class to another class and when the object is instantiated is the space reserved for this private variable in the memory??
what is mean by design pattern
What is the output of the following code: int v() { int m=0; return m++; } int main() { cout<<v(); } 1) 1 2) 0 3) Code cannot compile
There are 2 empty jars of 5 and 3 liters capacity. And a river is flowing besides. I want to measure 4 liters of wanter using these 2 jars. How do you do this?
//what is wrong with the programme?? #include<iostream.h> template <class first> class dd { first i; public: void set(); void print(); }; void dd< first>:: set() { cin>>i; } void dd< first>::print() { cout<<"\n"<<i; } void main() { dd <char>g; g.set(); g.print(); }
Write an operator overloading program to Overload ‘>’ operator so as to find greater among two instances of the class.
how to write a java program for an output ****0 ***01 **012 *0123 01234
What is encapsulation in oops?
c++ provides classes...and classes do what we want but why then strcut are used...if we say data hiding... it is also provided by c++ in structs then why to prefer clasess
What is a mixin class?
What is the significance of classes in oop?
What is a class in oop?