MCQ On OOPS Concept - C++ Programming

19.Can main() function be made private?

A. Yes, always
B. Yes, if program doesn’t contain any classes
C. No, because main function is user defined
D. No, never

View Answer

20. At what point of time a variable comes into existence in memory is determined by its

A. Data type
B. Storage class
C. Scope
D. All of the above

View Answer

21.Which of the following concepts is used to implement late binding?

A. Static function
B. Virtual function
C. Const function
D. Operator function

View Answer

22.For Cat and Animal class, correct way of inheritance is

A. Class Cat: public Animal
B. Class Animal: public Cat
C. Both are correct way
D. None is correct way

View Answer

23.Which of the following operators cannot be overloaded ?

A.  .
B.  ?:
C.  >>
D.  Both A and B

View Answer

24. Which one of the following options is correct about the statement given below? The compiler checks the type of reference in the object and not the type of object.

A. Inheritance
B. Polymorphism
C. Abstraction
D. Encapsulation

View Answer

25.Which of the following correctly describes overloading of functions?

A. Virtual polymorphism
B. Transient polymorphism
C. Ad-hoc polymorphism
D. Pseudo polymorphism

View Answer

26.How many loops are there in C++ 98?

A. 2
B. 3
C. 4
D. 5

View Answer

Also check :


* You must be logged in to add comment.