VKV SirTest Lab

Object-Oriented Programming: MCQ questions with answers

CS Fundamentals (Placement), Unit 4. 60 Object-Oriented Programming questions with explanations (CS Fundamentals (Placement)). Topics: Object-Oriented Programming. Take a free test now.

Topics

Key terms: abstract, constructor, methods, design pattern, multiple inheritance, achieved

Sample questions with answers

  1. Most restrictive access specifier:

    Options: A) public   B) protected   C) private   D) default

    Answer: C) private. Private members are accessible only within the class.

  2. In C++, a destructor is written with which prefix?

    Options: A) #   B) ~   C) !   D) &

    Answer: B) ~. Example: ~Car().

  3. Constructors can be:

    Options: A) Overloaded   B) Inherited as-is   C) Static   D) Virtual in Java

    Answer: A) Overloaded. Different parameter lists.

Take a free Object-Oriented Programming test

All units of CS Fundamentals (Placement)