CS304 Solved Sample Paper by Qalb-e-Momin
- Type
- Quiz
- Course
- CS304 Object Oriented Programming
- Size
- PDF 119 KB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
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?
Q15. What is multiple inheritance in Object-Oriented (OO) programming?
Q16. A/an __________ is a template definition of methods and variables of a class and its object cannot be instantiated.
Q18. Correct format to declare a template function is _______________.
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_____________.
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
Related CS304 files
All CS304 files →Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.