- Type
- Quiz
- Course
- CS304 Object Oriented Programming
- Size
- PDF 528 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 2, 3, 4 of 12. Download the file for all 12 pages.
Which of the following best describes relationship between Book and BookChapter classes?
Correct answer: Composition
The keyword "friend" should be placed in ___________ : A. Main Function B. Function Definition C. Anywhere in program
D. Function Declaration Google
Which of the following stores the address of a variable?
Correct answer: Pointer
_____ is creating objects of one class inside another class. A. Association B. Inheritance C. Aggregation
D. Composition Page 125
Which of the following can be used as an alternative to static members?
Correct answer: Global Variables
What is the general syntax of overloading Unary Operator as member function of the class?
Correct answer: TYPE & operator OP ();
Which of the following operators operate on one operand?
Correct answer: Unary Operators
Composition is __________ and aggregation is ____________ relationship. A. Weak, Weak B. Weak, Strong
C. Strong, Weak
D. Strong, Strong
Which of the following function declaration is correct to overload the + operator as member function in Complex class?
Correct answer: Complex operator +(const Complex & rhs);
Insertion operator is ________________ associative. A. Left to Left B. Right to Left
C. Left to Right Page 160
D. Right to Right
Which of the following statement is TRUE about a class's Static Member Function?
Correct answer: It is used to access static data members only.
Which of the following is the correct way of declaring a constant variable named RollNo?
Correct answer: const int RollNo;
Which of the following is defined as stream extraction operator in C++?
Correct answer: >> Page 158
What will be the output of the following code? #include<iostream> using namespace std; int main()
int const x = 10;cout << ++x;}
A. 10
B. Run Time Error C. 11 D. Compile time Error
In C++, the subscript operator [] must be overloaded as a _______ of the class, with one parameter of _______ type.
A. Member function, int Google
B. Member function, char
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.