What is the output of the program?
#include
class Base { static int age; public: Base () {}; ~Base () {}; void setAge(int a=10) {age = a;}
void Print() { cout << age;}
};
int Base::age=0;
int main () { Base a,*b; b = new Base(); a.setAge(); b?>setAge(20); a.Print(); b?>Print(); return 0;
}
A. It prints: 2020
B. It prints: 1020
C. It prints: 20
D. It prints: 10