Predict the output of the following program?
#include <iostream>
using namespace std;
class GfG {
GfG() {
cout << "Constructor Called" << endl;
}
};
int main() {
cout << "Main Started" << endl;
return 0;
}
Compiler Error
Main Started
Constructor Called
Constructor Called
Main Started
Main Started
This question is part of this quiz :
C++ Constructors,Constructors & Destructor,Constructors, Destructors, and this Pointer