- Type
- Quiz
- Course
- CS304 Object Oriented Programming
- Size
- PDF 467 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 42. Download the file for all 42 pages.
CS304 Quiz 2
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. Suppose str1, str2 and str3 are objects of class String. Choose appropriate declaration of overloaded assignment operator for the following statement to work correctly. str1 = str2 = str3;
In C++, which of the following is defined as stream insertion operator?
Choose correct declaration of overloaded inequality (!=) operator for class String as nonmember friend function. None of the given options
How the information hidden within an object can be accessed?
Through its interface Which of the following defines default constructor for class " Student"? Student() {//...
The sub-object’s life is not dependent on the life of master class in ___________. Aggregation Hiding the implementation details makes program: Easy to understand The functions defined inside the class are by default ________. Inline Which of the following statement is TRUE about static function of a class? It is used to access static data members. Deconstruct is a function which has the same name as that of class but starts with a—– sign
'this' pointer cannot be passed implicitly to __________ functions. Static Member Which of the following can be the behavior of an object “Usman”? Eat
Messages Constructor is used to______the objects of a class. Initialize Which of the following is NOT an access specifier in C++? Hidden
Extension Suppose a class does not have any constructor. What will happen when an object of this class is created? Compiler will call implicit default constructor. In case when we define the function outside the class then we must use the keyword _________ to make the function inline. Inline In constant member function the type of this pointer is: Constant pointer to constant data
Extension We can get the address of a variable stored in a pointer using __________: & symbol A child inherits characteristics from its _________. Parent
Which of the following function declaration is correct to overload the + operator as member function in Complex class?
Complex operator +(const Complex & rhs); Which of the following is not true about constant member function?
What is the general syntax of overloading Unary Operator as member function of the class? TYPE & operator OP (); _____ is creating objects of one class inside another class.
Which of the following is true about constructor?
All of the given option
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.