CS201 Solved MidTerm201 4.doc

Verified academic study resource for CS201 (Introduction to Programming) under the Computer Science at Virtual University of Pakistan. This DOC 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
CS201 – Introduction to Programming
Faculty
Computer Science
Format
DOC
Type
Midterm
Coverage
Mid-Term Exam Scope (Lectures 1 to 22)
Tags
SOLVED, MIDTERM

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 CS201.

What this file covers — CS201 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 CS201 Solved MidTerm201 4.doc for free?

You can preview and download "CS201 Solved MidTerm201 4.doc" (CS201 DOC, ~240 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs201-solved-midterm201-4-doc) with 100% free high-speed downloads and zero registration requirements.

What syllabus chapters and lectures are covered in this CS201 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 CS201 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 CS201 solved past papers and handouts verified for 2026 exams?

Yes. All CS201 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

Solved By:	Hamid Khan
		BS IT (3rd Semester)
		pathfinder610@gmail.com

Question No: 1 If we write a statement like s2 = s1; ___ will be the calling object and ____ will be passed to the = operator as an argument.
       ► s1, s1
       ► s1, s2
       ► s2, s1
       ► s2, s2
Question No: 2 If we write a statement like s2 = s1; s2 will be the calling object and s1 will be passed to the = operator as an argument.
cout << setfill(‘0’) << setw(7) << 128 ;
       ► 0000128
       ► 0128128
       ► 1280000
       ► 0012800
Question No: 3 The stream insertion and extraction operators are not already overloaded for _______
       ► Built-in data types
       ► User-defined data types
       ► Both built-in and user-defined types
       ► None of the given options
Question No: 4 Constructors can not be overloaded like ordinary functions.
       ► True
       ► False
Question No: 5 Overloaded new operator function takes parameter of type size_t and returns
       ► void (nothing)
       ► void pointer
       ► object pointer
       ► int pointer
 Question No: 6 Which of the following is the correct way to declare a variable x of integer type?
       ► x int ;
       ► integer x ;
       ► int x;
       ► x integer
Question No: 7 Reserve words cannot be used as a variable name.
       ► True
       ► False
Question No: 8 A template function must have at least ---------- generic data type
       ► Zero
       ► One
       ► Two
       ► Three
 Question No: 9 Template functions can also be overloaded
       ► True
       ► False
 Question No: 10 We can not make a member function of a class as template function.
       ► True
       ► False not sure
Question No: 11 When break statement is encountered in switch statement, it
       ► Stops the entire program
       ► Stops the execution of current statement
       ► Exits from switch statement
       ► None of the given options
Question No: 12 We can also define a variable of user define data type (object) as static.
       ► True
       ► False
Question No: 13 The declarator of Plus (+) member operator function is
       ► Class-Name  operator + (Class-Name  rhs)
       ► operator Class-Name + ( )
       ► operator Class-Name + ( rhs)
       ► Class-Name  operator + ( )
Question No: 14  Let suppose
    int a, b, c, d, e;
  a = b = c = d = e = 42;
This can be interpreted by the complier as:
       ► a = (b = (c = (d = (e = 42))));
       ► (a = b = (c = (d = (e = 42))));
       ► a = b = (c = (d = (e = 42)));
       ► (a = b) = (c = d) = (e = 42);
Question No: 15 What will be the range of numbers generated by function rand () % 9?
       ► 0 to 9
       ► 1 to 9
       ► 0 to 8
       ► 1 to 8
Question No: 16 When 6 divides any number, the remainder will always be less than 6. Then result will be between therefore we will add 1. 1 + rand ( ) % 6;
Which of the following is the correct function call having array named student of 10 elements as a parameter.
       ► addRecord(student[]) ;
       ► addRecord(student) ;
       ► addRecord(student[10]) ;
       ► addRecord(*student) ;
Question No: 17 Declaring structures does not mean that memory is allocated.
       ► True
       ► False
Question No: 18 Identifier is a name that can be given to variables, labels and functions.
       ► True
       ► False
Question No: 19 If a class A declares itself a friend of class B and a class B declares itself a friend of class C then
       ► Class A is also a friend of class C.
       ► Class B is also a friend of class A.
       ► Class A is also a friend of class C if A declares C as its friend.
       ► Class A is also a friend of class C if C declares A as its friend.
Question No: 20 Which of the following statement is best regarding declaration of friend function?
       ► Friend function must be declared after public keyword.
       ► Friend function must be declared after private keyword.
       ► Friend function must be declared at the top within class definition.
       ► It can be declared anywhere in class as these are not affected by the public
            and private keywords.
Question No: 21 A pointer is a special type of variable that contain ___________
       ► Memory Address
       ► Data values
       ► Both Values and Memory
       ► None of given of options
Question No: 22 When memory for a program is allocated at run time then it is called ___
       ► static memory allocation
       ► dynamic memory allocation
       ► stack memory allocation
       ► virtual memory allocation
Question No: 23 What purpose do classes serve?
       ► Data encapsulation
       ► Providing a convenient way of modeling real-world objects
       ► Simplifying code reuse
       ► All of the given options
Question No: 24 Which of the following function cannot be overloaded?
       ► Member functions
       ► Utility functions
       ► Constructor
       ► Destructor
Question No: 25 The following prototype of unary operator function indicates that it is __
       ► Member functions of post increment operator
       ► Member functions of  pre increment operator
       ► Non-member functions of post increment operator
       ► Non-member functions of  pre increment operator
Question No: 26 Static variable which is defined in a function is initialized __________.
       ► Only once during its life time
       ► Every time the function call
       ► Compile time of the program

More CS201 files

All CS201 files · Midterm Prep 2026 · MCQs Bank