C++ Institute CPA - C++ Certified Associate Programmer CPA-21-02 Question # 36 Topic 4 Discussion

C++ Institute CPA - C++ Certified Associate Programmer CPA-21-02 Question # 36 Topic 4 Discussion

CPA-21-02 Exam Topic 4 Question 36 Discussion:
Question #: 36
Topic #: 4

What is the output of the program?

#include

#include

using namespace std;

struct t

{

int tab[2];

};

class First

{

struct t u;

public:

First() {

u.tab[0] = 1;

u.tab[1] = 0;

}

void Print(){

cout << u.tab[0] << " " << u.tab[1];

}

};

int main()

{

First t;

t.Print();

}


A.

It prints: 2 2


B.

It prints: 1 1


C.

It prints: 1 0


D.

It prints: 0 0


Get Premium CPA-21-02 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.