Home » C++ Programming » Functions

Which of the following statement is correct about the program given below? #include class CuriousTab { int x, y, z; public: CuriousTab(int x = 100, int y = 30, int z = 0) { this->x = x; this->y = y; this->z = z; Display(); } void Display() { cout<< x << " " << y << " " << z; } }; int main() { int a = 0, b = 1, c = 2; int &x = ++a; int &y = --b; int z = c + b - -c; CuriousTab objCuriousTab(x, y, z); return 0; }

Correct Answer: The program will print the output 1 0 4.

← Previous Question Next Question→

More Questions from Functions

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion