CPA practice question 14 of 30

What is the output of the program? #include using namespace std; class BaseC { int i; public: BaseC() { i=?1;} BaseC(int i) { i=i; } void seti(int a) { i = a; }; void Print() { cout seti(10); o?>Print(); }

Full set: 220 questions
Answer options
A: It prints: 10 Correct answer
B: It prints: ?1
C: It prints: 0
D: Compilation error
Correct Answer:
A. It prints: 10
Scroll to Top