Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

C++ Institute Exam CPA-21-02 Topic 1 Question 16 Discussion

Actual exam question for C++ Institute's CPA-21-02 exam
Question #: 16
Topic #: 1
[All CPA-21-02 Questions]

Which code line inserted instead of the comment below will cause the program to produce the expected output?

Show Suggested Answer Hide Answer
Suggested Answer: A, B

Contribute your Thoughts:

Letha
21 hours ago
Hold on, the question says to use the 'expected output', so I'm guessing we need to call the print() method of the derived class B. Option C for the win!
upvoted 0 times
...
Carman
5 days ago
Wait, aren't we supposed to use the scope resolution operator to access the print() method of A? I'm leaning towards option B.
upvoted 0 times
...
Natalya
10 days ago
But if you look at the image, it clearly shows that ob2 is an object of class A, so A) ob2.A::print() makes more sense
upvoted 0 times
...
Judy
11 days ago
Hmm, looks like we need to call the print() method of the base class A, not B. I think option A is the way to go.
upvoted 0 times
...
Kizzy
12 days ago
I disagree, I believe the answer is C) ob2.B::print()
upvoted 0 times
...
Natalya
14 days ago
I think the correct answer is A) ob2.A::print()
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77