Question
1.
#include
2.
using namespace std;
3.
class Base
4.
{
5.
public:
6.
Base ( )
7.
{
8.
cout
What is the output of this program?
1.
#include
2.
using namespace std;
3.
class Base
4.
{
5.
public:
6.
Base ( )
7.
{
8.
cout
Answer: Option D
Was this answer helpful ?
In this program, We are printing the order of execution of constructor and destructor in the class.
Output:
$ g++ dert4.cpp
$ a.out
1342
Was this answer helpful ?
Submit Solution