Increase your chances of passing the C++ Institute CPA-21-02 exam questions on your first try. Practice with our free online CPA-21-02 exam mock test designed to help you prepare effectively and confidently.
What will the variable "age" be in class B?
class A {
int x;
protected:
int y;
public:
int age;
A () { age=5; };
};
class B : public A {
string name;
public:
B () { name="Bob"; };
void Print() {
cout << name << age;
}
};
What happens when you attempt to compile and run the following code?
#include
What happens when you attempt to compile and run the following code?

What is the output of the program given below?
#include
What happens when you attempt to compile and run the following code?
#include
© Copyrights FreeMockExams 2026. All Rights Reserved
We use cookies to ensure that we give you the best experience on our website (FreeMockExams). If you continue without changing your settings, we'll assume that you are happy to receive all cookies on the FreeMockExams.