class Choice Question public Question { public: : ChoiceQuestion(); void set_text (string new_text); }; Choice Question:: ChoiceQuestion() {} void Choice Question::set_text (string new_text) { } } int main() { cout << "Choice Question set_text function" << endl; Question* q1 = new Question; ChoiceQuestion* cq1 = new ChoiceQuestion; q1 = cq1; q1->set_text("Which function?"); return 0; Which of the following is true about the statement "q1->set_text ("Which function?");"? Question::set_text(string new_text) is called by q1 which then calls ChoiceQuestion::set_text (string new_text) ChoiceQuestion::set_text (string new_text) is called by q1 which then calls Question::set_text(string new_text) Question::set_text (string new_text) is called by q1 ChoiceQuestion::set_text(string new_text) is called by q1
class Choice Question public Question { public: : ChoiceQuestion(); void set_text (string new_text); }; Choice Question:: ChoiceQuestion() {} void Choice Question::set_text (string new_text) { } } int main() { cout << "Choice Question set_text function" << endl; Question* q1 = new Question; ChoiceQuestion* cq1 = new ChoiceQuestion; q1 = cq1; q1->set_text("Which function?"); return 0; Which of the following is true about the statement "q1->set_text ("Which function?");"? Question::set_text(string new_text) is called by q1 which then calls ChoiceQuestion::set_text (string new_text) ChoiceQuestion::set_text (string new_text) is called by q1 which then calls Question::set_text(string new_text) Question::set_text (string new_text) is called by q1 ChoiceQuestion::set_text(string new_text) is called by q1
Related questions
Question
C++
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps