Question
1.
#include
2.
using namespace std;
3.
class sample
4.
{
5.
public:
6.
sample()
7.
{
8.
cout
What is the output of this program?
1.
#include
2.
using namespace std;
3.
class sample
4.
{
5.
public:
6.
sample()
7.
{
8.
cout
Answer: Option C
Was this answer helpful ?
As we are passing the object without any attributes it will return as X::X().
Output:
$ g++ large.cpp
$ a.out
X::X()
Was this answer helpful ?
Submit Solution