Sail E0 Webinar

MCQs

Total Questions : 57 | Page 5 of 6 pages
Question 41.

Which of the following statement is correct?


  1.    A constructor is called at the time of declaration of an object.
  2.    A constructor is called at the time of use of an object.
  3.    A constructor is called at the time of declaration of a class.
  4.    A constructor is called at the time of use of a class.
 Discuss Question
Answer: Option A. -> A constructor is called at the time of declaration of an object.


Question 42.

Which of the following is an abstract data type?


  1.    int
  2.    double
  3.    string
  4.    Class
 Discuss Question
Answer: Option D. -> Class


Question 43.

Which of the following concepts means adding new components to a program as it runs?


  1.    Data hiding
  2.    Dynamic typing
  3.    Dynamic binding
  4.    Dynamic loading
 Discuss Question
Answer: Option D. -> Dynamic loading


Question 44.

How many types of polymorphisms are supported by C++?


  1.    1
  2.    2
  3.    3
  4.    4
 Discuss Question
Answer: Option A. -> 1

The two main types of polymorphism are run-time (implemented as inheritance and virtual functions), 

and compile-time (implemented as templates).


Question 45.

Which of the following concepts provides facility of using object of one class inside another class?


  1.    Encapsulation
  2.    Abstraction
  3.    Composition
  4.    Inheritance
 Discuss Question
Answer: Option C. -> Composition


Question 46.

cout is a/an __________ .


  1.    operator
  2.    function
  3.    object
  4.    macro
 Discuss Question
Answer: Option C. -> object


Question 47.

Why reference is not same as a pointer?


  1.    A reference can never be null.
  2.    A reference once established cannot be changed.
  3.    Reference doesn't need an explicit dereferencing mechanism.
  4.    All of the above.
 Discuss Question
Answer: Option D. -> All of the above.


Question 48.

How many instances of an abstract class can be created?


  1.    1
  2.    5
  3.    13
  4.    0
 Discuss Question
Answer: Option D. -> 0


Question 49.

Which of the following concepts of OOPS means exposing only necessary information to client?


  1.    Encapsulation
  2.    Abstraction
  3.    Data hiding
  4.    Data binding
 Discuss Question
Answer: Option C. -> Data hiding


Question 50.

Which of the following cannot be friend?


  1.    Function
  2.    Class
  3.    Object
  4.    Operator function
 Discuss Question
Answer: Option C. -> Object


Latest Videos

Latest Test Papers