CS201 (Final term Notes) Important Topics Covered 2025.pdf

Verified academic study resource for CS201 (Introduction to 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
CS201 – Introduction to Programming
Faculty
Computer Science
Format
PDF
Type
Final-Term
Coverage
Final-Term Exam Scope (Lectures 23 to 45)
Tags
IMPORTANT, 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 CS201, regardless of midterm scores.

What this file covers — CS201 syllabus roadmap

  1. Object-Oriented Paradigms: Classes & Data Abstraction — Lectures 23 to 29 (Pages 281 to 360). 16% Final-Term Marks (Core OO Concepts)
  2. Inheritance Hierarchies & Dynamic Polymorphism — Lectures 30 to 36 (Pages 361 to 435). 20% Final-Term Marks (Virtual Functions & V-Tables)
  3. Templates, Standard Library & Persistent File I/O — Lectures 37 to 41 (Pages 436 to 510). 14% Final-Term Marks (Generic Code & Streams)
  4. 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 CS201 (Final term Notes) Important Topics Covered 2025.pdf for free?

You can preview and download "CS201 (Final term Notes) Important Topics Covered 2025.pdf" (CS201 PDF, ~320 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs201-final-term-notes-important-topics-covered-2025-pdf) with 100% free high-speed downloads and zero registration requirements.

What syllabus chapters and lectures are covered in this CS201 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 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

CS-201 FINAL TERM NOTES (THEORETICALLY)

Lecture No 23

1.Pre-processor:
Old: #include <iostream.h>
New: #include <iostream>

2.Include Directive:
It is written as:
#include “myHeaderfile.h”

3. Define Directive:
Also called Macros.
Macros is a special name, which is substituted in the code by its
definition and, as a result we get an expand code.
With the define directive , we can define PI as:
#define Pi 3.1415926
 Jab macros ko use Kiya jata hai to is mein assignment operator Nahin
lagaya jata,, without Assignment operator, value assign ki jati hai

4. Pre-processor directives (Mcqs)

   #include <filename>
   #include “filename”
   #define
   #undef
   #ifdef
   #ifndef
   #if
   #else
   #elif
   #endif
   #error
   #line
   #pragma
   #assert

5. Macros:
Macros are classified into two categories.
First: The first type of macros can be written using #define. The
value of PI can be defined as:
#define Pi 3.1415926
Second: The second type of macros takes arguments. It is also
called a “parameterized macros”.
Consider the following:
#define square (x) x*x
Correct definition of the macros will be:
#define square (x) ((x)*(x))

Lecture No 24
   1.Memory Allocation:
   Memory will be allocated during the execution of program.

   There are two types of memory
     1. Static
     2. Dynamic

     Static: Static Allocation is also called “Compile time
     allocation”.
     This memory allocation is defined at the time when we write
     the program while exacting knowing how much memory is
     required.
     Static memory stored in “Stack”.
     Dynamic: Whenever we don’t know in advance how much
     memory space would be required , it is better to use
     dynamic memory allocation.
     Dynamic memory stored in “heap”.

        2.Void Pointer:
        Jab b ap void pointer ko use Karen gy to sab say pehly
        apko uski “casting” krni pryge....

        Casting: Cast means the conversion of “void” into a type
        of pointer that can be used for native data type like int,
        char, float etc.....
        For example:
                             Void *ptr

                           (int*) ptr

     It is an error to try to use the void pointer and dereference it.
     Note: Aik pointer ki by default value “NULL” Hoti hai.
     NULL value ko use Krny k liye apko 2 header files ki zarurat
     parti hai.....
         1. Stdlib.h
         2. Stddef.h
Zero value is an invalid memory address.

3.Difference b/w Malloc, Calloc & Realloc Function :
Malloc(): Malloc() function is used to allocate a block of memory
dynamically.
Calloc(): Calloc() is a function which is used to allocate multiple
blocks of memory.
Realloc(): Realloc() is a function which is used to resize the memory
block which is allocated in Malloc() or Calloc() before.
Memory leak: Memory leakage occurs in C++, when programmers
allocates memory by using “new” keyword and forgets to deallocate
the memory by using “delete()” function or “delete[]” operator.
One of the most memory leakage occurs in C++ by using wrong delete
operator.

Lecture No 25
1.Top-down Structured Programming:
A top-down approach is a programming methodology that involves
starting with an overview of the problem, breaking it down into

smaller sub-problems, and then gradually building the solution by
implementing each sub-problem in a hierarchical manner.
Top-down structured programming also called “Divide & Conquer”.
2.Single Entry Single Exit:
This technique only used inside the function ,, not outside.

Arguments & parameters are Sane thing,, don’t confuse.

3.Local & Global Variables:
Local Variables: inside the braces, the variables are called “Local
Variables”
Global Variables: Outside the braces, the variables are called
“Global Variables”.
4.Inline Function:
When the function called compiler needs some extra time to execute
it.
But if our function is small and we are just doing common addition
or multiplication in function. Then we can make that function online
by just adding “inline” keyword in front of the function.
Disadvantages of Inline Function:
    The inline function may not work is a function returning
     values, if a loop switch or a GOTO statement exists.
     If function contains static variables & if function is recursive.
5.Function Overloading:

C++ lets you specify more than one function of the same name in the
same scope. These functions are called overloaded functions, or
overloads.

The following statement stand for:

((A)>(B)?(A)(B))
If A greater than B then output A.
Means:
    > (Greater than)
    ? (Then)
    : (Output)

   Lecture No 26

   Class Structure:
   class student
   {

   };

   Note: Classes banty huye ap (class keyword) k liye small letters use
   Karen gy.....
   Classes mein sirf 2 cheezen use Hoti hen, these are following:

      Variables
      Functions
There are three types of Access Modifiers used in Classes:
   Public
   Private
   Protected

Note:
   Function (Classes) Ko “main function” k bahir bnaya jaega or
     phr “main function” k andr us function Ko call Kiya jata hai....
   Har class Ka aik object laazmii hota h ,, wo koi b letter ho Sakta
     hai....
   Object k sath (.) Dot operator lga Kar Kisi b Class function Ko
     call Kiya jata hai .....!

Lecture No 27

Difference between Constructor & Destructor:

Constructor: Constructor is called by the compiler whenever the
object of the class is created, it allocates the memory to the object
and initializes class data members.
Destructor: A destructor is called by the compiler when the object is
destroyed and its main function is to deallocate the memory of the
object

Types of Constructor:

         Default Constructor
         Parameterized Constructor

         Copy Constructor

Utility Function: utility is a header file in the C++ Standard Library.
This file has two key components: rel_ops , a namespace containing
set of templates which define default behavior for the relational

More CS201 files

All CS201 files · Midterm Prep 2026 · MCQs Bank