Skip to content
VUBuddy

CS304 Quiz 2 2022

Object Oriented Programming PDF 707 KBUpdated 23 Oct 2026
Quiz CS304 Quiz 2 2022 PDF 707 KB
vubuddy.com
Type
Quiz
Course
CS304 Object Oriented Programming
Size
PDF 707 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 707 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 29. Download the file for all 29 pages.

How can we differentiate between constructor and destructors?

Destructor are preceded by a tilde(~) symbol and constructor are not preceded with any symbol.

If you do not initialize static variable of int type then it is automatically initialized with ____

Choose the correct statement

All of the given options

___ associates the objects of the exact two classes.

Binary association

Which of the following is the advantage of inheritance?

Reusability

Member function defined inside a class declaration are __ by default

Public

Class is a single class provides functionally to operate on different type of data. Template

Which of the following may inherit from an ordinary class?

Which of the following represents complete specialization? Template <int.char>

Are called Non-type parameters

Which of the following is correct way to define a template class X?

Which of the following is a sequence Container?

Vector

Which of the following may inherit from an ordinary class?

Which of the following is NOT an Associate Container?

Group · When was specialize a function template .it is called · Function template Overriding

Which of the following types of Inheritance is used to model “Implemented in terms of” relationship?

Private

In case of protected inheritance, public members of base class will be in derived class? Protected In C++ by default access of classes is .

Private

If there is a pointer p to objects of a base class , and it contains the address of an object of a derived Class, and both classes contain a virtual member function, ding(), then the statement p->ding(); will cause the version of ding() in the class to be executed.

Derived

In case of private inheritance, private members of base class will be in derived class. Hidden

Defines the order of evaluation of an operator in an expression.

Operator Precedence

Which of the following is the correct syntax of declaring static variable “count” of type int? Static int count;

Defining a function in class body, the compiler treats that function as:

Inline function · What is the output of the following code?Int main() · {intconst x = 10; cout<< ++x; return 0;}

Which of the following statements best describes the Constructor?

Constructor is used to initialize the data members of a class.

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.