cs304_mid_term_5_www.vu786.com.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
- Type
- Study Resource
- Coverage
- Mid-Term Exam Scope (Lectures 1 to 22)
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
- Core Architecture, Syntax & Primitive Data Structures — Lectures 1 to 6 (Pages 1 to 65). 15% Objective Marks (8–10 MCQs)
- Conditional Branching, Loops & Logical Control Flow — Lectures 7 to 12 (Pages 66 to 140). 18% Exam Marks (MCQs + 2-Mark Short Questions)
- Memory Management, Pointers, Arrays & Functions — Lectures 13 to 18 (Pages 141 to 215). 22% Exam Marks (High Yield for Midterms)
- 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_mid_term_5_www.vu786.com.pdf for free?
You can preview and download "cs304_mid_term_5_www.vu786.com.pdf" (CS304 PDF, ~240 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs304-mid-term-5-www-vu786-com-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
MIDTERM EXAMINATION
Spring 2010
CS304- Object Oriented Programming (Session - 6)
om
Time: 60 min
Marks: 38
Question No: 1 ( Marks: 1 ) - Please choose one
Suppose there is an object of type Person, which of the following can be considered as
one of its attributes
► Name
► Age
► Work()
► Both Name and Age
What a derived class can add?
► New data members
► New constructors and destructor
6
► All of given
.c
Question No: 2 ( Marks: 1 ) - Please choose one
► New member functions and New friend functions
Question No: 3 ( Marks: 1 ) - Please choose one
________ is/are used to access information hidden within an object?
78
► Interface
► Private data members
► Private member functions
► Both public and private members
Question No: 4 ( Marks: 1 ) - Please choose one
this pointers are not accessible for static member functions.
► True
vu
► False
Question No: 5 ( Marks: 1 ) - Please choose one
A static member function cannot be declared.
► Static
► Implicit
► Explicit
► Virtual
Question No: 6 ( Marks: 1 ) - Please choose one
C++ compiler does not allow to dynamically allocate memory for objects
om
► False
► True
Question No: 7 ( Marks: 1 ) - Please choose one
Given the following class
class Base{
int Age=33;
}
How you can improve above class with respect to accessing the field Age?
► Define the variable Age as private
► Define the variable Age as protected
method that updates it
.c
► Define the variable Age as private and create a get method that returns it and a set
► Define the variable Age as protected and create a set method that returns it and a get
method that updates it
Question No: 8 ( Marks: 1 ) - Please choose one
Friend class and friend function can be used as an alternate to each other
6
► True
► False
Question No: 9 ( Marks: 1 ) - Please choose one
78
Which of the following operators always takes no argument if overloaded?
►/
►-
►+
► ++
Question No: 10 ( Marks: 1 ) - Please choose one
Suppose that the Test class does not have an overloaded assignment operator. What
vu
happens when an assignment a=b; is given for two Test objects a and b?
► The automatic assignment operator is used
► The copy constructor is used
► Compiler error
► Run-time error
Question No: 11 ( Marks: 1 ) - Please choose one
Assume a class C with objects obj1, obj2, and obj3. For the statement obj3 = obj1 - obj2
to work correctly, if the overloaded - operator must
► take two arguments.
► return a value.
om
► create a named temporary object.
► take four arguments
Question No: 12 ( Marks: 1 ) - Please choose one
Which operator can not be overloaded?
► The relation operator ( >= )
► Assignment operator ( = )
► Script operator ( [] )
► Conditional operator (? : )
Question No: 13 ( Marks: 1 ) - Please choose one
---------
► Encapsulation
► Information Hiding
► Abstraction
.c
We achieve independence of internal implementation from its external interface through--
► both encapsulation and information hiding
6
Question No: 14 ( Marks: 1 ) - Please choose one
Which one of the following is not an object association?
► Simple Assocation
78
► Inheritance
► Aggregation
► Composition
Question No: 15 ( Marks: 1 ) - Please choose one
We capture the object attributes and behavior in Object Oriented programming using------
---------
► Class
vu
► Function
► Data Members
► Instances
Question No: 16 ( Marks: 1 ) - Please choose one
The return type of a constructor is of -------------
► Integer
► Chracter
► Double
► No type
Question No: 17 ( Marks: 2 )
om
Can we create an array of objects for a class having default constructor?. Justify your
answer.
Question No: 18 ( Marks: 2 )
Friend functions increase ‘Data vulnerability’, what is your opinion ?
Question No: 19 ( Marks: 2 )
Explain two benefits of setter functions.
Question No: 20 ( Marks: 3 )
Consider the class given below what will be the values in variables x,y and z after
creating object of this class,
class ABC{
int x;
int y;
int z;
public:
ABC();
};
6
ABC::ABC():x(10),z(x),y(x)
{
…
.c
}
78
Question No: 21 ( Marks: 3 )
Explain what type of copy the default assignment operator "=" does when applied to
objects. (shallow copy or deep copy)
Question No: 22 ( Marks: 5 )
What is composition? Explain it with the help of an example.
vu
Question No: 23 ( Marks: 5 )
How we can overload Stream Extraction and Insertion Operators in c++?Give example
code for Complex Number Class.
More CS304 files
- CS304 - Object Oriented Programming - All in One.pdf (PDF · Study Resource)
- CS304 - Object Oriented Programming 2.pdf (PDF · Study Resource)
- CS304 - Object Oriented Programming 2.pdf (PDF · Study Resource)
- CS304 MIDS MERGE BY ASFAND YARR.pdf (PDF · Study Resource)
- CS304 Mega File .pdf (PDF · Study Resource)
- CS304 Mega File by hackerz.pdf (PDF · Study Resource)
- CS304 Most Important File 2023 BY Danish Hanif.pdf (PDF · Study Resource)
- CS304 Most Important File 2023 BY Danish Hanif.pdf (PDF · Study Resource)