Ques 1 OOPS
What is the output of the following C++ Code?
class A { public: A() { cout<<"A Present"; } ~A() { cout<<"A Absent "; } }; class B: public A { public: B() { cout<<"B Present"; } ~B() { cout<<"B Absent "; } }; int main() { B obj; return 0; }
Ques 2 OOPS
What is the output of the following C++ Code?
class SmallCode { SmallCode() { cout << "SmallCode Constructor is Called"; } }; int main() { SmallCode s1; return 0; }
Ques 3 OOPS
What is the output of the following C++ Code?
class SmallCode { SmallCode() { cout << "SmallCode Constructor is Called"; } }; int main() { SmallCode obj1, *obj2; return 0; }
Ques 4 OOPS
What is the output of the following C++ Code?
class SmallCode { public: int num; }; int main() { SmallCode obj1= {100}; SmallCode obj2=obj1; cout << obj1.num << " " << obj2.num; return 0; }