CS201 Practice Exercises.pdf

Verified academic study resource for CS201 (Introduction to Programming) under the Computer Science at Virtual University of Pakistan. This PDF document (Verified Study Resource) covers Full Course Curriculum spanning approximately 280 pages across 8 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
Study Resource
Coverage
Full Course Curriculum

Review this document alongside the official handouts and test your retention in the Interactive MCQs Studio.

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)
  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 CS201 Practice Exercises.pdf for free?

You can preview and download "CS201 Practice Exercises.pdf" (CS201 PDF, ~280 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs201-practice-exercises-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 Full Course Curriculum 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 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

CS201 Practice Exercises

         Hello World! Program and Operators
Problem Statement # 01
Create a C++ program that begins by displaying the message "Hello, World!" on the screen.
Subsequently, prompt the user to enter an integer, float number and character input. Upon
receiving the input, display the entered integer, float and character on the monitor screen.
The program should encompass the following functionalities:

•      Display Hello word! Message: The program should use the <iostream> header to
       incorporate standard input-output stream functionality. Upon execution, the program
       should display the hello Word! Message on the screens.

•      Input three Numbers: Program should display the message to enter an integer input
       and then take an integer value as input from the user. Subsequently it should display the
       message to enter the float input and take input the float number and lastly, program
       diplays the message to take character data type and then take character input from the
       user.

•      Display the Message: Once the program has taken the three data types it should
       displays the three data tapes i.e. integer, float and character on separate lines on the
       monitor screen.
Sample Data:

       Integers: 1,2, 3 etc, Float: 2.65, 3.89 etc. Characters: a, b, c , A etc.

Console Screenshot (Reference):

Problem Statement # 02

Implement a C++ program that calculates the area and perimeter of different geometrical
shapes. And displays the results as per the input values provided by the users.

The program should include the following functionalities:

    •    Calculate Area and Perimeter of the Circle: Upon execution, the program ask the
          user to input the radius of the circle. After getting the input it should calculate the
         circumference and the area of the circle. You can take the radius as float data type.
                                      Circumference of circle: 2πr.

                                            Area of circle: πr2

•       Area and the Perimeter of Rectangle: Program should ask the user to take the length
        and width of the rectangle and calculate the area and perimeter of the Rectangle. You
        can take the length and width as float data type.

                                Perimeter of Rectangle: 2 (Length + width).

                            Area of Rectangle: Length x Width

•       Displays Result: Once your program has taken input from the user it should calculate
        the result of area, perimeter and circumference of corresponding geometric shape and
        displays it on the screen.

Sample Data:

Float Length: 2.65, 3.89 etc.
Console Screenshot (Reference):

Problem Statement # 03

    Design a C++ program that enables users to convert temperature measurements between
    Fahrenheit, Celsius, and Kelvin. The program should ask the user to enter a temperature
    value in decimal data type in corresponding unit (Fahrenheit, Celsius, or Kelvin) and then
    convert it to the other two units.
    The program should include the following three functionalities:

•      Input in Fahrenheit: Upon execution, it should prompt the user to enter a temperature
       value in Fahrenheit. After receiving the input in doble data type then program should
       convert the temperature to Celsius and Kelvin by using the following formulas:

                                  Celsius = (Fahrenheit - 32) * 5/9
                                  Kelvin = Celsius + 273.15
       Finally, the program should display the converted temperatures in Fahrenheit and
       Kelvin to the user.

•      Input in Celsius: Program should prompt the user to enter a temperature value in
       Celsius. After receiving the input in double data type then program should convert the
       temperature to Fahrenheit and Kelvin by using the following formulas:

                                  Fahrenheit = (Celsius * 9/5) + 32

                                  Kelvin = Celsius + 273.15
       Finally, the program should display the converted temperatures in Fahrenheit and
       Kelvin to the user.

•      Input in Kelvin: it should prompt the user to enter a temperature value in Kelvin. After
       receiving the input in double data type, the program should convert the temperature to
       Fahrenheit and Celsius by using the following formulas:

                              Fahrenheit = (Kelvin - 273.15) * 9/5 + 32

                              Celsius = Kelvin - 273.15
       Finally, the program should display the converted temperatures in Fahrenheit and
       Celsius to the user.
Sample Data:

Float Temperature: 63.75, 63.5.89 etc.

Console Screenshot (Reference):

Your program should give the one of the following outputs.

Sample Output 1

Sample Output 2

Sample Output 3

Sample Output 4

Problem Statement # 04

Develop a C++ program that calculates both simple and compound interest based on user-
provided input for the principal amount, annual interest rate, time, and the number of times the
interest is compounded per year. The program should prompt the user to enter these values and
then display the calculated simple interest and compound interest. Ensure the program handles
user inputs effectively and displays results clearly.

    The program should include the following two functionalities:

•      Simple Interest: Develop a C++ program that calculates simple interest based on user-
       provided input. The program should prompt the user to enter the principal amount, the
       annual interest rate (as a percentage), and the time (in years). Using the formula:

                          Simple Interest = (Principal × Rate × Time) /100

       the program will compute the simple interest and display the result. This functionality
       allows users to quickly determine the amount of interest they will earn or owe over a
       specified period, based on a fixed interest rate applied to the initial principal amount.

More CS201 files

All CS201 files · Midterm Prep 2026 · MCQs Bank