Skip to content
VUBuddy

CS304 Final Term MCQs by Sparrows

Object Oriented Programming PDF 1.2 MBUpdated 23 Oct 2026
Final term past paper CS304 Final Term MCQs by Sparrows PDF 1.2 MB
vubuddy.com
Type
Final term past paper
Course
CS304 Object Oriented Programming
Size
PDF 1.2 MB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 1.2 MB

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 1, 2, 3 of 29. Download the file for all 29 pages.

CS304 by Sparrow · Final Term · Fall 2021-2022

  1. In c++ dynamic binding and polymorphism will be achieved when member function will be __.
  •  Private
  •  Public

 virtual#

2. Virtual functions allow you to

  •  create an array of type pointer-to-base class that can hold pointers to derived classes.
  •  create functions that can never be accessed.
  • group objects of different classes so they can all be accessed by the same function code.#

3. In order to define a class template the first line of definition must be:

 template <class T>#

  •  typename <template T>

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

  • The constructor of base class is executed before the constructor of derived class.

Q5. Which of the following causes run time binding?

  •  Declaring object of abstract class
  •  Declaring pointer of abstract class

 Declaring overridden methods as non-virtual#

Q6. Which of the following is/are advantage[s] of generic programming?

  •  Reusability
  •  Writability
  •  Maintainability

 All of given#

Q7. Which of the following is the best approach if it is required to have more than one functions having exactly same functionality and implemented on different data types?

 Templates #

  •  Overloading

8. The concept of derived class is involved in _____

  1. Template functions use _________ than ordinary functions.
  •  Greater Memory

 Lesser Memory#

  •  Equal Memory
  1. Non Template Friend functions of a class are friends of ________instance/s of that class.

 All #

  •  One specific

11. By default the vector data items are initialized to ____

  • 0 #
  •  0.0
  •  1

12. A copy constructor is invoked when

  •  a function do not returns by value.

 an argument is passed by value.#

  1. Like template functions, a class template may not handle all the types successfully.

 True #

  •  False
  1. In Private _____ only member functions and friend classes or functions of a derived class can convert pointer or reference of derived object to that of parent object
  2. Then int member i of base class is accessible in class,
  •  derived 1 only

 derived 2 only #

Q16. In case of public inheritance, protected members of base class will be in derived class?

  •  Private
  •  Public

 Protected#

  1. Friend’s functions of class are _ members of that class.
  •  Public
  • Private #
  1. By default assignment operator (=) performs,

 Shallow copy#

  •  Deep copy
  1. In protected inheritance the public members of base class become ___ in derived class.
  •  Public
  •  Private

 Protected #

  1. Compiler can automatically generates the following constructor/s for a class,
  •  Default constructor
  •  Copy constructor

 Both of these #

  1. ______________ Class is a single class provides functionally to operate on different type of data.
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.