CS304 MCQS+ NOTCE FOR FINAL TERM.pdf
Verified academic study resource for CS304 (Object Oriented Programming) under the Computer Science at Virtual University of Pakistan. This PDF document (Final-Term Solved Past Paper & Examination Pack) covers Final-Term Exam Scope (Lectures 23 to 45) spanning approximately 320 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
- Final-Term
- Coverage
- Final-Term Exam Scope (Lectures 23 to 45)
- Tags
- MCQ, FINALTERM
Virtual University regulations strictly require achieving at least 20% marks in the Final-Term exam paper alone (typically 12+ marks out of 60) to pass CS304, regardless of midterm scores.
What this file covers — CS304 syllabus roadmap
- Object-Oriented Paradigms: Classes & Data Abstraction — Lectures 23 to 29 (Pages 281 to 360). 16% Final-Term Marks (Core OO Concepts)
- Inheritance Hierarchies & Dynamic Polymorphism — Lectures 30 to 36 (Pages 361 to 435). 20% Final-Term Marks (Virtual Functions & V-Tables)
- Templates, Standard Library & Persistent File I/O — Lectures 37 to 41 (Pages 436 to 510). 14% Final-Term Marks (Generic Code & Streams)
- 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 MCQS+ NOTCE FOR FINAL TERM.pdf for free?
You can preview and download "CS304 MCQS+ NOTCE FOR FINAL TERM.pdf" (CS304 PDF, ~320 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs304-mcqs-notce-for-final-term-pdf-2) with 100% free high-speed downloads and zero registration requirements.
What syllabus chapters and lectures are covered in this CS304 file?
This document covers Final-Term Exam Scope (Lectures 23 to 45) across 4 distinct lecture units (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
CS‐304 MCQS+SHORT ANSWER
QUESTION FILE FOR FINAL
TERM BY MOHSIN CHINIOTI
VUSQUAD134@GMAIL.COM
03137248280
SUBSCRIBE MY CHANNEL VU SQUAD
https://youtube.com/channel/UC29fO
QkUyTKY0QzOQ5rPZAQ
A TEAM BY VU SQUAD
CS-304 FINAL TERM NOTCE BY
MOHSIN CHINIOTI
03137248280
VUSQUAD134@GMAIL.COM
Q 1: Write the names of two types of Templates.
1: Function Templates, 2: Class Templates
Q 2: Can a constructor throw an exception? How to handle the errors, when the constructor fails?
Yes, Constructor can throw an exception But In constructor if an exception is thrown than all objects
created so far are destroyed. Exception due to constructor of any contained object or the constructor of a
parent class can be caught in the member initialization list.
Q 3: Why these operators cannot be overloaded? (. , .* , ?: , ::)
They take actual current object name, rather than value in their argument.
Q 4: What is graceful termination method of Error handling; give its example using C++.
Program can be designed instead of unusual termination, that causes the wastage of resources, program
performs clean up tasks, mean we add check for expected errors (using if conditions), Example – Graceful
Termination
Int Quotient (int a, int b) {
If (b == 0) {cout << “Denominator can’t “<< “be zero” << endl;
// Do local clean up
Exit (1) ;}
Return a / b ;}
Q 5: How can you describe Virtual destructor? Why Virtual destructor is used?
When delete operator is applied to a base class pointer, base class destructor is called. Only base class
object will be deleted other parts will remain than as a result in memory leakage (wastage of memory),
Virtual Destructors make it possible that complete object will be deleted so there is no memory leak
(waste of memory).
Q 6: Motor car can be called a good candidate for being an object so, this object contains
Encapsulation characteristic. You are required to apply the concept of Encapsulation on “Motor
Car”.
Yes Motor Car is a good candidate for apply the concept of encapsulation In Motor Car we have the
following Objects which fully describes the phenomena of encapsulation.
1. Steer Wheels 2. Accelerate 3. Change Gear 4. Apply Brakes 5. Turn Lights On/Off
In encapsulation we just provide the user an interface and hide the Full implementation because user don’t
want to know the implementation he just want about his work should be done perfectly.
Q 7: What do you know about exception in initialization? Explain with example.
Exception due to constructor of any contained object or the constructor of a parent class can be caught in
the member initialization list. The programmer may want to catch the exception and perform some action
to correct the problem. For example,
Student::Student (String aName): name (aName) P-1
/*the constructor of String can throw a exception*/
{ ...
}
Q 8: How can we set the default values for non type parameters?
We can set default value for these non type parameters, because we can passed parameters in ordinary
functions,
Template< class T, int SIZE = 10 >
Class Array { Private: T ptr
[SIZE]; Public:
Void doSomething ();
…}
Q 9: Explain the statement vector <int> ivec (4, 3).
This would create a vector of four elements, each one initialized to 3. Ivec looks like this: 3 3 3 3
Q 10: Tell the procedure of making a class abstract in C++ by giving an example.
In C++, we can make a class abstract by making its function(s) pure virtual. On the other hand a class
with no pure virtual function is a concrete class. For example, Class Shape {
…
Public:
Virtual void draw () = 0 ;}
Q 11: Write down a list of four intangible objects?
1. Time: 2. Light: 3. Intelligence: 4. Temperature: 5.software:
Q 12: Give the pseudo code of non case sensitive comparison function of string class.
Int caseSencompare (char* str1, char* str2) {
For (int i = 0; i < strlen (str1) && i < strlen (str2); ++i)
If (str1 [i]! = str2 [i])
Return str1 [i] - str2 [i];
Return strlen (str1) - strlen (str2) ;}
Q 13: Describe three properties necessary a container to implement generic algorithms. We
declare that this algorithm is generic, because it works for any aggregate object (container) that
defines following three operations
a. Increment operator (++) b. Dereferencing operator (*) c. Inequality operator (! =)
Q 14: Mobile is a good entity for being an object. Write characteristics, behavior and unique ID.
Characteristics: Buttons, Battery, Screen
Behavior: Calling, Sending Message, Internet, Multimedia
Unique ID: Nokia
Q 15: What are the container requirements? Write details.
As each container need to perform certain operations on the elements like their copy or their comparison
and their sorting, so the elements that we add in containers should provide these kind of basic functions.
Examples of these functions are given below,
When an element is inserted into a container, a copy of that element is made using, P-2 Copy
Constructor or Assignment Operator.
Containers and many algorithms compare elements.
C++ does not provide function of comparison operator (==) or less than operator (<) by itself so we have
to provide these function in element class if we use containers.
Q 16: Resolve problems in overloading assignment operator in string class.
The problem in statement str1=str2=str3 is resolved as:
str1= (str2 = str3) Assignment operator is called two times one for part str2 = str3 and then for str1 =
(str2 = str3) as assignment operator is right associate so first str2=str3 will be executed, and str2 will
become equal to str3,
Q 17: What is random-iterator? What relation b/w random iterator and vector.
Random Access Iterators: -
They have all the capabilities of bidirectional Iterators plus they can directly access with element of a
container. Vectors are as a smart array. They manage storage allocation for you, accessing elements withMore CS304 files
- All Subjects Mid & Final 25000 Pdf Files.pdf (PDF · Final-Term)
- CS-304 Latest Mcq's Final Term By Vu Topper RM.pdf (PDF · Final-Term)
- CS-304 Solved Mcq's Final Term By Vu Topper RM.pdf (PDF · Final-Term)
- CS304 - Final Term Papers (www.weblyceum.com) 01.pdf (PDF · Final-Term)
- CS304 - Final Term Papers (www.weblyceum.com) 02.pdf (PDF · Final-Term)
- CS304 - Final Term Papers (www.weblyceum.com) 03.pdf (PDF · Final-Term)
- CS304 - Final Term Papers (www.weblyceum.com) 04.pdf (PDF · Final-Term)
- CS304 - Final Term Papers (www.weblyceum.com) 04.pdf (PDF · Final-Term)