VU Midterm Past Papers
26 solved midterm past paper MCQs for CS304 (Object Oriented Programming) at Virtual University, each with the correct answer marked. Use them to learn the VU question style and test your recall. An independent study tool — not affiliated with VU.
Prefer a summary first? Read the CS304 midterm handout.
Q1. A static member function can be called, when a class is not_____________.
Q2. The ______________ relationship indicated that an object contains other objects.
Q3. A generalization relation between classes are implemented using
Q4. A member function having the same name as that of a class and a ~ sign with it is called,
Q5. For classes with common behavior, you can save effort by placing the common behavior in a ________________.
Q6. Which of the following are an advantage of OOP?
Q7. A static member function cannot be declared
Q8. A C++ class is similar to:
Q9. Suppose that the Test class does not have an overloaded assignment operator. What happens when an assignment a=b; is given for two Test objects a and b?
Q10. Which operator can not be overloaded?
Q11. We capture the object attributes and behavior in Object Oriented Programming using:
Q12. A template provides a convenient way to make a family of
Q13. What is true about function templates?
Q14. If there is a pointer p to objects of a base class, and it contains the address of an object class and both classes contain a nonvirtual member function. Ding(), then the statement p->ding(); will cause the version of ding() in the _________ class to be executed.
Q15. Which is not the advantage of inheritance?
Q16. What problem(s) may occur when we copy objects without using deep copy constructor?
Q17. To convert from a user-defined class to a basic type, you would most likely use.
Q18. Friend functions are ____________ function of a class.
Q19. In object oriented programming, a class of objects cans___________ properties from another class of objects.
Q20. __________ satisfy the condition of polymorphism.
Q21. In OOP a class is an example of ______________.
Q22. The members of a class that can be access without creating the object of the class is called.
Q23. Suppose there is an object of type Person, which of the following can be considered as one of itsattributes.
Q24. What a derived class can add?
Q25. _____________ is/are used to access information hidden within an object?
Q26. Which of the following operators always takes no argument if overloaded?