Skip to content
VUBuddy

CS304 Quiz 3 by VU Topper RM

Object Oriented Programming PDF 874 KBUpdated 23 Oct 2026
Quiz CS304 Quiz 3 by VU Topper RM PDF 874 KB
vubuddy.com
Type
Quiz
Course
CS304 Object Oriented Programming
Size
PDF 874 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 874 KB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

Preview text

Text from pages 2, 3, 4 of 34. Download the file for all 34 pages.

If you have three classes in a C++ program A, B, and C where class A inherits from class B, then class _____________ contains all the characteristics of class _________________. A. B, C B. A, C C. B, A

D. A, B

A post-fix unary operator is implemented in C++ using non-member function with __________ argument(s). A. Three B. One

C. Two

D. Zero

Suppose derived class is inherited from base class. What happens when a derived class object is created?

  1. None of the given options
  2. The constructor of only derived class is executed.
  3. The constructor of base class is executed after the constructor of derived class.
  4. The constructor of base class is executed before the constructor of derived class

Correct answer: The constructor of base class is executed before the constructor of derived class

________________ represents “IS A” relationship. A. Aggregation B. Simple Association

C. Inheritance

D. Composition

Outside world can access only __________ members of a class using its object. A. Protected

B. Public

C. Private D. No member is accessibl

In C++, the subscript operator [] must be overloaded as a _______ of the class, with one parameter of _______ type.

A. Member function, int

B. Member function, char C. Non-member function, char D. Non-member function, int

We can call base class constructor from derived class constructor, A. We can not call the base class constructor B. From derived class constructor body C. From any member function of derived class

D. From the initializer list of derived class constructor

Which of the following is defined as stream extraction operator in C++?

  1. *<
  2. <<
  3. >>
  4. *>

Correct answer: >>

In C++, which of the following keywords works only with constructors?

  1. explicit
  2. const
  3. static
  4. virtual

Correct answer: explicit

protected: void func1();

A. protected

B. none of the given options C. private D. public

private: int i;

class class2 : public class1

Then int member i of class1 is ______ in class2. A. none of the given options

B. private

C. public D. protected

private: int i;

Then int member i of class1 is ______ in class2. A. none of the given options

B. protected

C. public

All CS304 files →
CS304 Object Oriented Programming All CS304 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.