Practice mode C++

How is a pure virtual function declared in C++?

Correct answer B. By writing = 0 at the end of its declaration

Explanation

A pure virtual function is declared as virtual void show() = 0;. Any class containing one becomes abstract and cannot be instantiated.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.