CS304 Midterm Current Quiz File By Danish Hanif.pdf

Verified academic study resource for CS304 (Object Oriented Programming) under the Computer Science at Virtual University of Pakistan. This PDF document (Midterm Solved Past Paper & Revision File) covers Mid-Term Exam Scope (Lectures 1 to 22) spanning approximately 240 pages across 4 curriculum modules, and is indexed for student examination review with instant in-browser preview and 100% free direct download.

Course
CS304 – Object Oriented Programming
Faculty
Computer Science
Format
PDF
Type
Midterm
Coverage
Mid-Term Exam Scope (Lectures 1 to 22)
Tags
CURRENT, MIDTERM

Focus on core definitions and repeated MCQs from Lectures 1–22. Remember that scoring in the First Half builds your safety buffer toward the mandatory 20% Two-Half passing rule in CS304.

What this file covers — CS304 syllabus roadmap

  1. Core Architecture, Syntax & Primitive Data Structures — Lectures 1 to 6 (Pages 1 to 65). 15% Objective Marks (8–10 MCQs)
  2. Conditional Branching, Loops & Logical Control Flow — Lectures 7 to 12 (Pages 66 to 140). 18% Exam Marks (MCQs + 2-Mark Short Questions)
  3. Memory Management, Pointers, Arrays & Functions — Lectures 13 to 18 (Pages 141 to 215). 22% Exam Marks (High Yield for Midterms)
  4. Midterm Consolidation, Strings & Algorithm Synthesis — Lectures 19 to 22 (Pages 216 to 280). Midterm Exam Culmination (Lectures 1–22 Scope)

Frequently asked questions

Where can I download CS304 Midterm Current Quiz File By Danish Hanif.pdf for free?

You can preview and download "CS304 Midterm Current Quiz File By Danish Hanif.pdf" (CS304 PDF, ~240 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs304-midterm-current-quiz-file-by-danish-hanif-pdf) with 100% free high-speed downloads and zero registration requirements.

What syllabus chapters and lectures are covered in this CS304 file?

This document covers Mid-Term Exam Scope (Lectures 1 to 22) across 4 distinct lecture units (Lectures 1 to 6, Lectures 7 to 12, Lectures 13 to 18, Lectures 19 to 22), featuring comprehensive definitions, solved objective questions, and examiner marking rubrics.

What is the passing criteria for CS304 under the VU 20% Two-Half Rule?

Under official Virtual University regulations, students must score at least 20% in the First Half (Quizzes, Assignments, GDBs, and Midterm combined) AND independently at least 20% in the Final-Term examination paper. Scoring under 20% in the final exam results in an automatic F grade regardless of earlier marks.

Are CS304 solved past papers and handouts verified for 2026 exams?

Yes. All CS304 materials on MIHORA VU—including Moaaz, Waqar Siddhu, and team archives—are reviewed against the current VU syllabus to help students prepare for 2026 Midterm, Final-Term, and online quiz examinations.

Inside this file

                      ‫‪CS304 Quiz File‬‬
                                                            ‫االسلمومکیلع!‬

  ‫ادیمرکاتوہںہکآپبسریختیےسوہںےگاکیفدونںیکتنحمےکدعبادمحلہلل‬

  ‫وروچلئویوینریٹسےکڈمرٹمااحتمنےکےیلافزلئایتررکیلںیہادیمرکاتوہںےکآپ‬

  ‫بسوٹسڈسٹنےکااحتمانتںیمتہبافدئہدنموہںیگ۔افزلئںیمیسکمسقیکئو ییھ‬

‫یطلغوہیئگوہوتاسےکےیلذعمرتوخاہںیہااشنءاہللذمدیتنحمےسانافزلئئورتہبانبںیئ‬

 ‫ےگ‪-‬آپبسوٹسڈسٹنےسزگارشےہہکامہرےویویٹبلنیچاورویبساٹیئئوافول‬

                                ‫رکںیل‪-‬‬

                     ‫لمکمرپیپزآوکپریمیویبساٹیئہپںیلمےگکنلےچیندایایگےہ‪-‬‬

           ‫‪Here is Website Link:‬‬             ‫‪https://hbdanish.me/‬‬

                ‫‪Here is YouTube Channel Link:‬‬

‫‪https://www.youtube.com/@Danish_Khagga‬‬
                      ‫ئنم‬
   ‫ارگآپولگاانپ الی‪-‬امی‪-‬اسیڈنیہلرکوااناچےتہںیہایااس نبسئوزئزرکوااناچےتہ‬

                                            ‫ںیہوتاسربمنہپواسٹاپیرکںی‪-‬‬

            ‫‪📱+923231731413‬‬
       ‫‪https://wa.me/message/7GG2TH2MZV3OL1‬‬

Question #1: Constant data members of a class can be initialized by using
_______________.

a) Constant Member Function

 b) Member Initializer List

c) Class

d) Non-constant Member Function

Correct Answer: b) Member Initializer List

Question #2: Consider the following code and choose the correct order of initialization
for the data members of the class.

class A {

     int a, b, c;

public:

     A(): b(10), c(0), a(7){}

};

Select the correct option:

a) a, c, b

b) a, b, c

c) b, a, c

d) b, c, a

Correct Answer: b) a, b, c
Question #3: Which of the following can be used as an alternative to static members? Select the
correct option:

a) Constant Variables

b) Global Variables

c) Array of Objects

d) Local Variables

Correct Answer: b) Global Variables
Question #4: In operator overloading, which of the following operators takes one or no
arguments? Select the correct option:

a) %

b) <<

c) *

d) ++

Correct Answer: d) ++
Question #5: In C++, the subscript operator [] must be overloaded as a _______ of the
class, with one parameter of _______ type. Select the correct option:

a) Member function, char

b) Member function, int

c) Non-member function, char

d) Non-member function, int

Correct Answer: b) Member function, int
Question #6: We can access a private static data member of a class through
_________________.

a) Global member function

b) Static member function

c) Static data member

d) Global data member

Correct Answer: b) Static member function

Question #7: If you do not initialize a static data member of a class of int type, it is
automatically initialized with _________.

a) 0

b) Null

c) 1

d) -32767

Correct Answer: a) 0

Question #8: Memory is allocated to non-static members only when _______________.

a) Program is compiled

b) Object is destructed

c) Class is created

d) Object is created

Correct Answer: d) Object is created

Question #9: In composition, ____________ are called from composed objects to
composing objects. Select the correct option:

a) Destructors

b) Variables

c) Pointers

d) Constructors

Correct Answer: a) Destructors

Question #10: Student *ptr = new Student("Ali"); is an example of __________.

a) Destructor

b) Static memory allocation

c) Dynamic memory allocation

d) Constructor

Correct Answer: c) Dynamic memory allocation

Question #1: If class B inherits from class A, which of the following is the parent class?

a) Both Class A & Class B
b) Class A
c) No parent class
d) Class B

Answer: b) Class A

Question #2: How can the information hidden within an object be accessed?

a) Through its private member functions
b) Through both public and private members
c) Through its private data members
d) Through its interface

Answer: b) Through both public and private members

Question #3: How can we identify classes from a given problem statement?

a) By extracting Nouns from the problem statement
b) By extracting Verbs from the problem statement

     c) By extracting Adjectives from the problem statement
     d) By extracting Adverbs from the problem statement

     Answer: a) By extracting Nouns from the problem statement

     Question #4: A relationship in which one class object gets destroyed if the other class object is
     destroyed.

     a) Composition
     b) Association
     c) Inheritance
     d) Aggregation

     Answer: a) Composition

     Question

     #include<iostream>
     using namespace std;
     int main() {
         int const x = 10;
         cout << ++x;
     }

     Options:

1.   11
2.   Compile time Error
3.   10
4.   Run Time Error

     Answer: 2. Compile time Error

     Question

     class test {

       int a;

       int b;

          int c;

     public:

          test():b(5),c(a),a(b){}

     };

     Options:

1.   5, 5, 5
2.   Junk value, 5, 5
3.   Junk value, 5, Junk value
4.   5, Junk value, 5

     Answer: 3. Junk value, 5, Junk value

     Question 3:

     Which of the following is an example of a unary operator?

     Options:

1.   Inequality Operator ( != )
2.   Increment Operator ( ++ )
3.   Equality Operator ( == )
4.   Division Operator ( / )

     Answer: 2. Increment Operator ( ++ )

     Question 4:

     In the expression b = c / d, the arity of the division (/) operator is ________:

     Options:

1.   2
2.   4
3.   1
4.   3

     Answer:

1. 2

     Question 5:

     Static Data Member of a class is declared ___________.

     Options:

1.   Outside the class
2.   Inside main() method
3.   Outside the main() method
4.   Inside the class

More CS304 files

All CS304 files · Midterm Prep 2026 · MCQs Bank