Home / MCQ Bank / Computer
Computer Constructors And Destructors In C Plus Plus Difficulty: Medium

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 0; }

Select the correct option to test your answer:

More Computer Questions

Multiplication of 111 2 by 101 2 is The events that is emulated by the jQuery library are What is the primary disadvantage of a linked list compared to an array? What will be the output of the following C++ function? int main() { register int i = 1; int *ptr = &i; cout << *ptr; return 0; } Which of the following property is used to set the color of a text?