cs304_mid_term_4_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
PDF
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

  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_mid_term_4_www.vu786.com.pdf for free?

You can preview and download "cs304_mid_term_4_www.vu786.com.pdf" (CS304 PDF, ~240 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs304-mid-term-4-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

          www.vu786.com

             CS304 Object Oriented Programming
             Mid Term Examination – Spring 2005
                  Time Allowed: 90 Minutes

Please read the following instructions carefully before attempting any of
the questions:
1. Attempt all questions. Marks are written adjacent to each question.
2. Do not ask any questions about the contents of this examination from anyone.
a. If you think that there is something wrong with any of the questions, attempt it
to the best of your understanding.
b. If you believe that some essential piece of information is missing, make an
appropriate assumption and use it to solve the problem.
c. Write all steps, missing steps may lead to deduction of marks.
d. All coding questions should be answered using the C ++ syntax.

You are allowed to use the Dev-C++ compiler to write and test your code. If you
do so please remember to copy and paste your code into the examination
solution area. (Do NOT share your code; your colleague could get higher
marks than you!!) **WARNING: Please note that Virtual University takes
serious note of unfair means. Anyone found involved in cheating will
get an `F` grade in this course.
Total Marks: 40 Total Questions: 3

Question No. 1 Marks : 30
Design and implement a String class that makes the following code work properly. The
class should store the string in a dynamically allocated memory.

int main()
{
String X, Y = "World!";
X = "Hello " + Y;
cout<< X << endl;
return 0;
}

           www.vu786.com

Question No. 2 Marks : 05
a. Write the exact type of this pointer in a member function of a class XYZ. 02
b. Write three distinct situations in which copy constructor of a class is called. 03
Answer:
       a)

            www.vu786.com

               XYZ *this;
       b)
              1. Assignment of private data members at the time of object creation.
              2. When an object is passed by vale to a function.
              3. When allocating memory dynamically we use copy constructor to avoid
dangling pointer issue.

Question No. 3 Marks : 05
class Complex
{
private:
double x,y;
static int z;
public:
Complex(double = 0.0);
friend ostream& operator<<(ostream&, const Complex&);
static int doSomething( ) { z = 2 * y; return z; }
};
a. What is wrong in the definition of member function doSomething( ). 03
Answer:
         Static keyword because using static key word we are declaring a static member
function doSomething(). Which can not use non static data members.
b. What will be the effect of writing the friend function operator<<(…) in private part
of the above class? 02
Answer:
         There will be no effect on friend function if we write it in private part. Friend
function is a friend function and can use any private or public data member of the class.
Where ever we declare it in class body.

More CS304 files

All CS304 files · Midterm Prep 2026 · MCQs Bank