cs304_mid_term_6_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_6_www.vu786.com.pdf for free?
You can preview and download "cs304_mid_term_6_www.vu786.com.pdf" (CS304 PDF, ~240 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs304-mid-term-6-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
CS304- Object Oriented Programming (Session - 2)
om
Question No: 1 ( Marks: 1 ) - Please choose one
Which part of an object exhibits its state?
► Data
► Operations
► Any public part
► Any private part
6
► organize data.
► pass arguments to objects of classes.
.c
Question No: 2 ( Marks: 1 ) - Please choose one
Inheritance is a way to
► add features to existing classes without rewriting them.
► improve data-hiding and encapsulation.
78
Question No: 3 ( Marks: 1 ) - Please choose one
Suppose you have been given the following design,
"A person has a name, age, address and -----. You are designing a class to represent a
type of person called a patient. This kind of person may be given a diagnosis, have a
spouse and may be alive".
Given that the person class has already been created, what of the following would be
appropriate to include when you design the patient class?
vu
► registration date and diagnosis
► age and -----
► ----- and diagnosis
► diagnosis and age
Question No: 4 ( Marks: 1 ) - Please choose one
What problem(s) may occur when we copy objects without using deep copy constructor?
om
► Dangling pointer
► Memory Leakage
► All of the given
► System crash
Question No: 5 ( Marks: 1 ) - Please choose one
► False
6 .c
this pointers are not accessible for static member functions.
► True
Question No: 6 ( Marks: 1 ) - Please choose one
A static member function cannot be declared.
78
► Static
► Implicit
► Explicit
► Virtual
Question No: 7 ( Marks: 1 ) - Please choose one
vu
_______ remain in memory even when all objects of a class have been destroyed.
► Static variables
► Instance variable
► Primitive variables
► None of given
Question No: 8 ( Marks: 1 ) - Please choose one
Friend functions are _____________ functions of a class.
om
► None of given
► object member
► non-member
► data member
Question No: 9 ( Marks: 1 ) - Please choose one
6
► Friendship is one way only
► Friendship is two way only
► NO Friendship between classes
.c
___________, which means if A declares B as its friend it does NOT mean that A can
access private data of B. It only means that B can access all data of A.
► Any kind of friendship
78
Question No: 10 ( Marks: 1 ) - Please choose one
The statement objA=objB; will cause a compiler error if the objects are of different
classes.
► True
► False
Question No: 11 ( Marks: 1 ) - Please choose one
vu
Identify which of the following overloaded operator function’s declaration is appropriate
for the given call?
Rational_number_1 + 2.325
Where Rational_number_1 is an object of user defined class Rational_number.
► Rational_number operator+( Rational_number & obj);
► Rational_number operator+(double& obj);
► Rational_number operator+(Rational_number &obj, double& num);
om
► operator+(double& obj);
Question No: 12 ( Marks: 1 ) - Please choose one
Which operator can not be overloaded?
► The relation operator ( >= )
► Assignment operator ( = )
► Script operator ( [] )
► Conditional operator (? : )
.c
Question No: 13 ( Marks: 1 ) - Please choose one
To convert from a user-defined class to a basic type, you would most likely use
6
► a built-in conversion operator.
► a one-argument constructor.
78
► an overloaded = operator.
► a conversion operator that’s a member of the class.
Question No: 14 ( Marks: 1 ) - Please choose one
The technique in which we visualize our programming problems according to real life’s
problems is called
----------------
► structured programming
► object oriented Programming
vu
► procedural programming
► non of the given
Question No: 15 ( Marks: 1 ) - Please choose one
In object orientated programming, a class of objects cans _____________ properties from
another class of objects
► Utilize
► Borrow
► Inherit
► Adopt
Question No: 16 ( Marks: 1 ) - Please choose one
om
A C++ class is similar to --------------------
► Structure
► Header File
► Library File
► None of the given
Question No: 17 ( Marks: 2 )
Can we create an array of objects for a class having user defined constructor? Justify your
answer.
Question No: 18 ( Marks: 2 )
.c
Friend functions increase ‘Programming bugs’. What is your opinion?
Question No: 19 ( Marks: 2 )
Explain two benefits of setter functions.
6
Question No: 20 ( Marks: 3 )
What are binary operators? Give an example of binary operators overloading using any
class.
78
Question No: 21 ( Marks: 3 )
Give c++ code to overload assignment operator for string class.
Question No: 22 ( Marks: 5 )
Writ c++ code to overload subscript[] operator for String class.
Question No: 23 ( Marks: 5 )
vu
Detect and correct compile time error(s) in the following code.
class Exam
{
char *ExamName;
int No_of_paper;
public:
Exam()
{
ExamName = "Final Term";
No_of_paper = 5;
}
om
void setname( char* name) const
{
ExamName = name;
}
void setpaper(int paper) const
{
No_of_paper = paper;
}
char* getname()
{
return ExamName;
}
int getpaper()
{
return No_of_paper;
}
};
6
int main()
{
const Exam exam1;
.c
cout << " Exam = "<<exam1.getname()<<endl;
78
cout << " Numbe of paper = " << exam1.getpaper();
getch();
return 0;
}
vu
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)