CS201 Midterm Short notes and Subjectives Question and Answer.pdf

Verified academic study resource for CS201 (Introduction to 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
CS201 – Introduction to Programming
Faculty
Computer Science
Format
PDF
Type
Midterm
Coverage
Mid-Term Exam Scope (Lectures 1 to 22)
Tags
SUBJECTIVE, 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 Midterm Short notes and Subjectives Question and Answer.pdf for free?

You can preview and download "CS201 Midterm Short notes and Subjectives Question and Answer.pdf" (CS201 PDF, ~240 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs201-midterm-short-notes-and-subjectives-question-and-answer-pdf-2) 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

                          www.VUAnswer.com
CS201-Imtroduction to Programming-Short Notes

1.      Describe History of C++?

The C++ programming language has a history going back to 1979, when Bjarne Stroustrup was doing
work for his Ph.D. thesis. One of the languages Stroustrup had the opportunity to work with was a
language called Simula, which as the name implies is a language primarily designed for simulations.

2.      What is Dev. C++?

Bloodshed Dev-C++ is a full-featured Integrated Development Environment (IDE) for the C/C++
programming language. It uses Mingw port of GCC (GNU Compiler Collection) as it's compiler. Dev-C++
can also be used in combination with Cygwin or any other GCC based compiler.

3.      Why Use Dev. C++ instead of C++ DOS IDE?

Dev-C++ is a free IDE for Windows that uses either MinGW or TDM-GCC as underlying compiler.
Originally released by Bloodshed Software, but abandoned in 2006, it has recently been forked by
Orwell, including a choice of more recent compilers.

4.      What is #Include directive or Copy books or Header File?

Many programming languages and other computer files have a directive, often called include (as well as
copy and import), that causes the contents of a second file to be inserted into the original file. These
included files are called copybooks or header files.

5.      Why we use curly braces in c?

Curly braces are used to group a set of statements. Often we use them along with loops and conditional
statements in order to avoid confusion and to define a clear scope.

6.      What is Main () function?

In C, the "main" function is treated the same as every function, it has a return type (and in some cases
accepts inputs via parameters). The only difference is that the main function is "called" by the operating
system when the user runs the program.

7.      How many data types are in C?

Void, Int, Float, Character, String

8.      How many types are for integers?

                          www.VUAnswer.com

                         www.VUAnswer.com
Int or signed int unsigned int, short int or signed short int, long int or signed long int, unsigned long int

9.      How many types are for Float data type?

Float, double, long double

10.     What is mean by using namespace std; in C?

The built in C++ library routines are kept in the standard namespace. That includes stuff like cout, cin,
string, vector, map, etc. Because these tools are used so commonly, it's popular to add "using
namespace std" at the top of your source code so that you won't have to type the std:: prefix constantly.

11.     Define the memory size of int variable types?

Type    Size in Bytes    Range

int or signed int 2      -32,768 to 32767

unsigned int     2       0 to 65535

short int or signed short int     1        -128 to 127

long int or signed long int       4        -2,147,483,648 to 2,147,483,647

unsigned long int        4        0 to 4,294,967,295

12.     Define the memory size of Float Variable types?

Type    Size(bytes)      Range

Float   4        3.4E-38 to 3.4E+38

double 8         1.7E-308 to 1.7E+308

long double      10      3.4E-4932 to 1.1E+4932

13.     How declare a variable?

The Syntax of Declare variable is data_type variable_name; where the data_type is the type of data
which can hold a variable variable_name might be anything except the C directives and reserve words.

14.     What is namespace?

Consider a situation, when we have two persons with the same name, Zara, in the same class. Whenever
we need to differentiate them definitely we would have to use some additional information along with
their name, like either the area if they live in different area or their mother or father name, etc. Same

                         www.VUAnswer.com

                           www.VUAnswer.com
situation can arise in your C++ applications. For example, you might be writing some code that has a
function called xyz() and there is another library available which is also having same function xyz(). Now
the compiler has no way of knowing which version of xyz() function you are referring to within your
code.A namespace is designed to overcome this difficulty and is used as additional information to
differentiate similar functions, classes, variables etc. with the same name available in different libraries.
Using namespace, you can define the context in which names are defined. In essence, a namespace
defines a scope.

15.       How define a namespace?

A namespace definition begins with the keyword namespace followed by the namespace name as
follows

namespacenamespace_name {

    // code declarations

}

To call the namespace-enabled version of either function or variable, prepend the namespace name as
follows:

name::code; // code could be variable or function.

16.       What are reserve words in C?

Reserve or Keywords are the words that C language use for his personal use a user cannot use reserve
words as variable, function or class name. Example: IF, Else, Switch, For, While, Float etc.

17.       What rules are for declaring a variable?

1.        Every variable name should start with alphabets or underscore (_).

2.        No spaces are allowed in variable declaration.

3.      Except underscore (_) no other special symbol are allowed in the middle of the variable
declaration.

4.        Maximum length of variable is 8 characters depend on compiler and operation system.

                           www.VUAnswer.com

                          www.VUAnswer.com
5.      Every variable name always should exist in the left hand side of assignment operator.

6.      No keyword should access variable name.

18.     What is difference between declaration and initialization of a Variable?

For a variable, a definition is a declaration which allocates storage for that variable.

 Initialization is the specification of the initial value to be stored in an object, which is not necessarily the
same as the first time you explicitly assign a value to it.

19.     What is cin and cout?

cout is used for output, cin for input. Cout and cin are not key words in the C++ language. They are

More CS201 files

All CS201 files · Midterm Prep 2026 · MCQs Bank