Question: Study the following code snippet: vector quiz ( 2 ) ; quiz ( [ theta ] = ) new Question; quiz
Study the following code snippet:
vector quiz;
quiz theta new Question;
quiz thetarightarrow settextWho was the inventor of mathrmC;
quizsetanswerBjarne Stroustrup";
ChoiceQuestion cqpointer new ChoiceQuestion;
cqpointersettext What is the most popular programming language?";
cqpointeraddchoiceDelphi false;
quiz cqpointer;
Which of the following statements about the last line of the code snippet is true?cqpointer cannot be assigned to quiz because cqpointer does not point to a Question object.The ChoiceQuestion object will be converted to a Question object.This is illegal because a ChoiceQuestion object requires more memory than a Question object does.The cqpointer will be converted to a pointer to a Question object.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
