Q.1.
Which of the following constructors are provided by the C++ compiler if not defined in a class?
Q.2.
When a copy constructor is called?
Q.3.
What will be the output of the following C++ code? #include <iostream> using namespace std; class A{ A(){ cout<<"Constructor called"; } }; int main(int argc, char const *argv[]) { A a; return}
Q.4.
What will be the output of the following C++ code? #include <iostream> using namespace std; class A{   public: A(){ cout<<"Constructor called"; } }; int main(int argc, char const *argv[]) { A *a; return}
Q.5.
What will be the output of the following C++ code? #include <iostream> using namespace std; class A{ public: int a; }; int main(int argc, char const *argv[]) { A a1 = {10}; A a2 = a cout<<a1.a<<a2.a; return}
Q.6.
What will be the output of the following C++ code? #include <iostream> using namespace std; class A{ public: int a; A(int a){ this->a = a; } }; int main(int argc, char const *argv[]) { A aa2(10); cout<<a2.a; return}
Q.7.
What will be the output of the following C++ code? #include <iostream> using namespace std; class A{ public: int a; A(int a=0){ this->a = a; } }; int main(int argc, char const *argv[]) { A aa2(10); cout<<a2.a; return}
Q.8.
What will be the output of the following C++ code? #include <iostream> using namespace std; class A{ public: int a; A(){ cout<<"Constructor called"; } }; int main(int argc, char const *argv[]) { A *a1 = (A*)malloc(sizeof(A)); return}
Q.9.
What will be the output of the following C++ code? #include <iostream> using namespace std; class A{ public: int a; A(){ cout<<"Constructor called"; } } a; int main(int argc, char const *argv[]) { return}
Q.10.
How destructor overloading is done?
Q.11.
Which of the following is correct?