Which of the following statements is correct about the C++ programming language?

Asked In: BPSC TRE 1.0

Options

  • A. In C++, both static and dynamic type checking are allowed.
  • B. In C++, member functions are allowed to be const.
  • C. In C++, dynamic checking is allowed.
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

D. More than one of the above

Detailed Explanation

Correct Answer: Option D

Explanation:
Statements A and B are correct. C++ performs static type checking at compile time and also supports certain runtime checks, such as dynamic_cast for appropriate polymorphic types. A const member function can be declared as void display() const. Therefore, more than one statement is correct.