Skip to content
VUBuddy

CS304 Solved Sample Paper by Qalb-e-Momin

Object Oriented Programming PDF 119 KBUpdated 23 Oct 2026
Quiz CS304 Solved Sample Paper by Qalb-e-Momin PDF 119 KB
vubuddy.com
Type
Quiz
Course
CS304 Object Oriented Programming
Size
PDF 119 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 119 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 1, 2, 3 of 11. Download the file for all 11 pages.

Fall 2022

CS304 - Object Oriented Programming Final Term Sample Paper

1. What is the keyword used in templates in C++?

A. class B. typename C. both class & typename (Correct) D. function

2. What is the purpose of using the "::" template-template parameter in C++?

A. Binding B. Rebinding C. Both binding & rebinding (Correct) D. Reusing

3. What does not require instantiation in C++?

A. Functions B. Non-virtual member function C. Member class D. All of the mentioned (Correct)

4. What is the keyword used to define user-defined data types in C++?

A. def B. union C. typedef (Correct) D. type

5. What is the scope of data types defined with typedef in C++?

A. Inside that block only B. Whole program (Correct) C. Outside the program D. Main function

6. What is a template in C++?

A. A formula for creating a generic class (Correct) B. A tool for manipulating a class C. A way of creating attributes D. None of the given

7. What is used for generic programming in C++?

A. Modules B. Templates (Correct) C. Virtual functions D. Abstract Classes

8. What can be passed by non-type template parameters at compile time in C++?

A. int B. float C. Constant expression (Correct) D. char

9. Function template in C++ is way of creating a function___________.

A. without a class B. with an exact type C. without blank spaces D. without specifying the exact type (Correct)

10. Which of the following is not an advantage of using Templates in C++?

A. High Reliability (Correct) B. Reusability C. Writability D. Generic Programming

11. Which one of the following is not a type of inheritance in C++? A. public B. virtual (Correct) C. private D. protected

12. In C++ inheritance, is it possible for a child class to initialize its indirect base classes through its constructor initialization list? A. Yes, it is possible B. No, it is not possible (Correct) C. It depends on the implementation. D. Only if the indirect base classes are direct base classes of the child class.

Q13. How many classes are required to implement the multiple inheritance in a program?

  1. Only two
  2. At least two
  3. At least three (Correct)
  4. Only four
  5. _____________ is used to solve multiple inheritance issues. A. Virtual inheritance (Correct) B. Friend functions C. Generic programming. D. Templates

Q15. What is multiple inheritance in Object-Oriented (OO) programming?

  1. a derived class inherits from multiple base classes. (Correct)
  2. a base class inherits from multiple derived classes.
  3. a class inherits from a single base class.
  4. a class cannot inherit from any base class.

Q16. A/an __________ is a template definition of methods and variables of a class and its object cannot be instantiated.

  1. virtual class
  2. static class
  3. concrete class
  4. abstract class(Correct)
  5. Specialization (Restriction) can be implemented using both ______ and ___________ inheritance. A. Public, Protected B. Private Protected (Correct) C. Virtual, Protected D. Public, Virtual E.

Q18. Correct format to declare a template function is _______________.

  1. template< class T >

void funName( T x ); (Correct)

B. template< classfunction T > void funName( T x );

C. template< Function T > void funName( T x );

D. template< class T function F> void funName( T x );

Q19. The target function for a call is selected at run-time is known as_____________.

  1. Dynamic binding (Correct)
  2. Static binding
  3. Function binding
  4. Object binding
  5. A mechanism that enables us to write a single function or class that works for all data types is known as _________.

A. Generic programming (Correct) B. Imperative programming C. Functional programming D. Logic programming

Q21. What is the purpose of using a cursor pointer declared outside an aggregate object?

A. Traverse elements (Correct) B. Store fixed value C. Store multiple values

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.