What will be the output of the following C++ code? [code] #include <iostream> using namespace std; class A{ public: int a; A(){ cout<<"Con

Trương Duy

New member
What will be the output of the following C++ code?
Code:
#include <iostream>  
using namespace std;
class A{
public:
	int a;
	A(){
		cout<<"Constructor called";
	}
} a;
int main(int argc, char const *argv[])
{
	return 0;
}
A. Constructor called
B. Nothing printed
C. Error
D. Segmentation fault
 

Tìm kiếm

Back
Top