What happens when you attempt to compile and run the following code?

What happens when you attempt to compile and run the following code?
#include using namespace std;
class Base { int age; public: class C {
int b; void PrintC() { cout << b; } }; Base () {age=5;}; void setAge(int a=20) {age = a;} void Print() { cout << age;} }; int main () { Base a; A. setAge(10); B. Print(); return 0; } A. setAge(10);
B. Print(); return 0; }
C. It prints: 1020
D. It prints: 105
E. It prints: 10
F. It prints: 20

Download Printable PDF. VALID exam to help you PASS.

Posted in: CPA

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.