OOPS Concepts

21

Which of the following is correct about the statements given below?

      1. All operators can be overloaded in C++.

      2. All operators can be overloaded in C++.

A. Only I is true.
B. Both I and II are false.
C. Only II is true.
D. Both I and II are true.

22

Which of the following is a mechanism of static polymorphism?

A. Operator overloading
B. Function overloading
C. Templates
D. All of the above

23

Which of the following ways are legal to access a class data member using this pointer?

A. this->x
B. this.x
C. *this.x
D. *this-x

24

Which of the following factors supports the statement that reusability is a desirable feature of a language?

A. It decreases the testing time.
B. It lowers the maintenance cost.
C. It reduces the compilation time.
D. Both A and B.

25

Which of the following statement is correct?

A. C++ allows static type checking.
B. C++ allows dynamic type checking.
C. C++ allows static member function be of type const.
D. Both A and B.