cs304 quiz 2.pdf

Verified academic study resource for CS304 (Object Oriented Programming) under the Computer Science at Virtual University of Pakistan. This PDF document (Live Quiz Dumps & Solved Objective Bank) covers Quizzes & Objective Exam Scope spanning approximately 180 pages across 8 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
Quiz
Coverage
Quizzes & Objective Exam Scope

Quiz questions often repeat with modified parameter values in both Midterm and Final exams. Practice with our 45-second timed simulator to master exam pacing.

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)
  5. Object-Oriented Paradigms: Classes & Data Abstraction — Lectures 23 to 29 (Pages 281 to 360). 16% Final-Term Marks (Core OO Concepts)
  6. Inheritance Hierarchies & Dynamic Polymorphism — Lectures 30 to 36 (Pages 361 to 435). 20% Final-Term Marks (Virtual Functions & V-Tables)
  7. Templates, Standard Library & Persistent File I/O — Lectures 37 to 41 (Pages 436 to 510). 14% Final-Term Marks (Generic Code & Streams)
  8. Final-Term Examination Dossier & Capstone Synthesis — Lectures 42 to 45 (Pages 511 to 585). Final-Term Exam Synthesis (Lectures 23–45 Scope)

Frequently asked questions

Where can I download cs304 quiz 2.pdf for free?

You can preview and download "cs304 quiz 2.pdf" (CS304 PDF, ~180 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs304-quiz-2-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 Quizzes & Objective Exam Scope across 8 distinct lecture units (Lectures 1 to 6, Lectures 7 to 12, Lectures 13 to 18, Lectures 19 to 22, Lectures 23 to 29, Lectures 30 to 36, Lectures 37 to 41, Lectures 42 to 45), 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 2, 2022

______________ Class is a single class provides functionally to operate on different type of
data.

Template

Which of the following may inherit from an ordinary class?

All of the given

Which of the following represents complete specialization?

Template <int.char>

The parameters given in template definition other than those used for mentoring templates
types are called

Non-type parameters

Which of the following is correct way to define a template class X?

typename &lt;class T &gt; class X {};

Which of the following is a sequence Container?

Vector

In resolution order of function template compiler searches for ___________in the end.

Generic template

__________ may inherit from a complete specialization.

All of the given option

Which of the following may inherit from an ordinary class?

All of the given option

Which of the following is NOT an Associate Container?

Group

When was specialize a function template .it is called___________

Function template overriding

Which of the following is/are key component(s) of standard Template Library?

All of the given option

Each ____________ of a template class by default becomes function template.

Member function

In statement “template<class U,int |=5>”the non type parameter is

Int |

Solution order highest priority is given to ________ in template

Complete template

In case of template specialization ,if compiler cannot find required complete

Partial specialization

_________ is a pointer which is declared outside the _________

Cursor, Container

Suppose a template class “Test” has a static data member. How many copies of this static
data member following line of C++ code?

Three

In statement template <class T,class U ,int |=5> the non-parameter is ______.

Class U

A template argument is preceded by the keyword ____________.

Class.

We can have ________ type of member functions in a class.

All of the given

Which of the following is NOT casting operator in C++ standard?

var_cast

Which of the following types of Inheritance is used to model "Implemented in terms of"
relationship?

Private

In case of protected inheritance, public members of base class will be ________ in derived
class?

protected

In C++ by default access of classes is ________.

Private

If there is a pointer p to objects of a base class , and it contains the address of an object of a
derived class, and both classes contain a virtual member function, ding(), then the
statement p->ding(); will cause the version of ding() in the ________ class to be executed.

derived

Suppose we have defined derived class copy constructor but have not defined base class
copy constructor then compiler will,

Use base class default constructor

In case of private inheritance, private members of base class will be ________ in derived
class.

hidden

________ defines the order of evaluation of an operator in an expression.

Operator Precedence

Which of the following is the correct syntax of declaring static variable "count" of type int?

static int count;

Defining a function in class body, the compiler treats that function as:

Inline function

What is the output of the following code?

int main()

{

int const x = 10;

cout << ++x;

return 0;

}

11

Which of the following statements best describes the Constructor?

Constructor is used to initialize the data members of a class.

Consider the following code segment:

class test

{

int a;

int b;

int c;

public:

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

}

What will the value of variables a, b, and c after instantiating an object of above class?

Junk value, 5, Junk value

Which of the following is a strong relationship?

Inheritance

________ Binding means that target function for a call is selected at compile time.

Static

In case of public inheritance, protected members of base class will be ________ in derived
class.

Protected

A template provides a convenient way to make a family of

functions and classes

Function overriding is done in context of,

Derived and base class

Which of the following is TRUE.

Derived class pointer can be used as Base class pointer

The default inheritance mode is,

Private inheritance

In Protected Inheritance the public members of base class become ________ in derived
class.

Protected

In resolution order compiler search firstly ________.

Ordinary function

Compiler generated copy constructor performs ________.

Both Shallow and Deep copy

A pure virtual function is a virtual function that

causes its class to be abstract

Methodologies to the development of reusable software relate to ________.

generic programming

In C++ generic programming is done using ________.

Packages

Consider the code below,

class class1{

private:

void func1();

};

class class2 : private class1 {

};

Function func1 of class1 is ________ in class2.

private

When derived class has user defined assignment operator.

Compiler itself calls base class default constructor.

A Child class can call constructor of its parent class through,

Both from its constructor initialization list or body

Consider the code below,

class class1{

public:

int i;

};

class class2 : public class1 {

};Then int member i of class1 is ________ in class2.

public

Consider the code below,

class class1{

protected:

int i;

};

class class2 : private class1 {

};Then int member i of class1 is ________ in class2.

protected

Static casting is,

Implicit way of calling base class functions from derived class

How many objects of a given class may be constructed in an application?

As many as the application asks for

The other name of specialization is ________.

Restriction

How can we differentiate between constructors and destructors?

Destructors are preceded with a tilde (~) symbol, and constructors are not preceded with
any symbol.

How many entities are there in the following scenario?Ali lives in the house that is near the
tree and he also drives his car.

2

Which of the following is True about Destructor?

All of the given

How many objects are involved in the N-ary association?

More than 3

More CS304 files

All CS304 files · Midterm Prep 2026 · MCQs Bank