CS304 Midterm Quizzes 2023 by Danish Hanif
- Type
- Midterm past paper
- Course
- CS304 Object Oriented Programming
- Size
- PDF 277 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 4. Download the file for all 4 pages.
Q1. _____ is creating objects of one class inside another class.
Q2. Which of the following is the correct syntax of declaring static variable “count” of type int?
Q3. _______ remain in memory even when all objects of a class have been destroyed.
Q4. What will be the output of the following code?
#include<iostream> using namespace std; int main() { int const x = 10; cout << ++x;
A. 11
B. 10
C. Compile time Error
D. Run Time Error
- Which of the following function declaration is correct to overload the + operator as member function in Complex class?
A. Complex operator +(const Complex & rhs); B. operator + Complex (const Complex & rhs); C. Complex +(const Complex & rhs); D. Complex operator + ::(const Complex & rhs);
6) Suppose we have a class named “Student”; which of the following statement is correctly
declaring the pointer to the object for “Student” class?
Student obj;
- Choose the correct option to declare an overloaded stream insertion operator for a user- defined class " String" as a non-member friend function.
A. friend void operator << (const String & rhs); B. friend void & operator << (ostream & os); C. friend ostream & operator << (ostream & os, const String & s); D. friend ostream & operator << ();
Q8. Which of the following statement is TRUE about a class's Static Member Function?
Q9. Which of the following is defined as stream extraction operator in C++?
Related CS304 files
All CS304 files →- CS304 Midterm Mega Quiz Spring 2020 Midterm PDF 4.8 MB
- CS304 Midterm Past Paper Spring 2006 Midterm PDF 129 KB
- CS304 Midterm Past Paper Spring 2005 Midterm PDF 164 KB
- CS304 Midterm Subjective by Talha Sajid Midterm PDF 717 KB
- CS304 Highlighted Handouts by VU Sparky Highlighted PDF 4.3 MB
- CS304 Assignment 2 Fall 2021 Assignment CPP 4 KB
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.