What is the output of the following program?

#include

using namespace std;

class data

{

public:

    int d;     

    data()

    {d = 5;}

    data(int x, int y)

    {d = 2 * x * y;}

    void display()

    {cout<< d<< endl;}

};

int main()

{

    data d1;

    data d2();

    d1.display();

    d2.display();

    return 0;

}

1
5 5
2
5 50
3
error
4
compiler dependent

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation