C++ Programming - OOPS Concepts

Exercise : OOPS Concepts - General Questions
  • OOPS Concepts - General Questions
31.
Which of the following is the correct way of declaring a function as constant?
const int ShowData(void) { /* statements */ }
int const ShowData(void) { /* statements */ }
int ShowData(void) const { /* statements */ }
Both A and B
Answer: Option
Explanation:
No answer description is available. Let's discuss.

32.
Which of the following concepts is used to implement late binding?
Virtual function
Operator function
Const function
Static function
Answer: Option
Explanation:
No answer description is available. Let's discuss.

33.
Which of the following statement is correct?
C++ allows static type checking.
C++ allows dynamic type checking.
C++ allows static member function be of type const.
Both A and B.
Answer: Option
Explanation:
No answer description is available. Let's discuss.

34.
Which of the following factors supports the statement that reusability is a desirable feature of a language?
It decreases the testing time.
It lowers the maintenance cost.
It reduces the compilation time.
Both A and B.
Answer: Option
Explanation:
No answer description is available. Let's discuss.

35.
Which of the following ways are legal to access a class data member using this pointer?
this->x
this.x
*this.x
*this-x
Answer: Option
Explanation:
No answer description is available. Let's discuss.