- Type
- Quiz
- Course
- CS304 Object Oriented Programming
- Size
- PDF 848 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 3. Download the file for all 3 pages.
Q1. Which of the following is pure virtual function?
Correct answer: virtual void print() = 0;
Q2. What does the virtual keyword ensure when used in a base class function in C++?
Correct answer: Dynamic binding
Q3. In statement "template <class T, class U, int I = 5>" ,the non-type parameter is _____________.
Correct answer: int I
Q4. Which of the following function can convert a class into an abstract class?
Correct answer: Pure virtual function
Q5. Which statement will be true for concrete class?
Correct answer: It can be instantiated.
Q6. In C++, dynamic binding and polymorphism will be achieved when member function will be ____.
Correct answer: virtual
Q7. Which class has at least one pure virtual function?
Correct answer: Abstract class
Q8. Each ___________ of a template class by default becomes function template.
Correct answer: Member function
Q9. Which of the following represents complete specialization?
Correct answer: template< int , char >
Q10. Which of the following represents partial specialization?
Correct answer: template< typename T, class W >
Q11. <p>__________ binding means that target function for a call is selected at compile time.</p>
Correct answer: <p>Static</p>
Q12. Polymorphism always works with ___________.
Correct answer: pointer to class objects
Q13. Which of the following is correct code to instantiate the object of given template Vector class for int type?
template <class T>
class Vector
A. Vector int obj; B. Vector obj <int>;
C. Vector <int> obj;
D. Vector obj<>int;
Q14. Which of the following is the correct syntax for passing two type arguments to a template?
Correct answer: template< typename T, typename U >
Q15. ___________ binding means that target function for a call is selected at run time.
Correct answer: Dynamic
Q16. Which of the following is known as Dereference operator in C++?
Correct answer: *
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.