CS508 Handouts by MS S25.pdf

Verified academic study resource for CS508 (Modern Programming Languages) under the Computer Science at Virtual University of Pakistan. This PDF document (Official Lecture Handouts & Highlighted Notes) covers Complete Course Handouts (Lectures 1 to 45) spanning approximately 450 pages across 8 curriculum modules, and is indexed for student examination review with instant in-browser preview and 100% free direct download.

Course
CS508 – Modern Programming Languages
Faculty
Computer Science
Format
PDF
Type
Handout
Coverage
Complete Course Handouts (Lectures 1 to 45)
Tags
HANDOUT

Virtual University examiners construct 100% of objective MCQs and subjective marking schemes directly from the official CS508 handouts.

What this file covers — CS508 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 CS508 Handouts by MS S25.pdf for free?

You can preview and download "CS508 Handouts by MS S25.pdf" (CS508 PDF, ~450 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs508-handouts-by-ms-s25-pdf) with 100% free high-speed downloads and zero registration requirements.

What syllabus chapters and lectures are covered in this CS508 file?

This document covers Complete Course Handouts (Lectures 1 to 45) 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 CS508 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 CS508 solved past papers and handouts verified for 2026 exams?

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

Modern Programming Languages

Introduction and Historical Background

Lecture 1-8

                                         1

Course Objectives
Thousands of different programming languages have been designed by different people
over the last 60 years. The questions that come to mind are:

   •   Why are there so many different programming languages?
   •   How and why they are developed?
   •   What is the intended purpose of a language?
   •   In what ways are they similar?
   •   What are the differences among them?
   •   Why wouldn’t we simply continue to use what we have today?
   •   What kinds of programming languages may be developed in future?

We will try to answer some of these questions in this course.

In addition, we will discuss the design issues of various languages, design choices and
alternatives available, historical context and specific needs, and specific implementation
issues.

Text Book
The main text book for this course is:
Concepts of Programming Languages, 6th Ed. by Robert Sebesta.

                                                                                        2

Reasons to study concepts of Programming Languages
The first question is: why should we study programming languages. There are many
reasons for that and some of them are enumerated in the following paragraphs.

1. Increased capacity to express programming concepts

Study of programming languages helps in increasing the capacity of express
programming concepts.

Dijkstra has put it as follows:
       The tools we use have a profound (and devious!) influence on our thinking habits,
       and, therefore, on our thinking abilities.

That is, one is limited in his/her thinking by the tools used to express his/her ideas.

Depth at which we can think is influenced by the expressive power of the language. It
includes the kind of algorithms you can develop. The range of software development
thought process can be increased by learning new languages as those constructs can be
simulated.

2. Improved background for choosing appropriate languages

Study of programming languages also helps one in choosing the right language for the
given task. Abraham Maslow says, "To the man who only has a hammer in the toolkit,
every problem looks like a nail."

That is, if the only tool you have is a hammer, then you will treat every problem like a
nail. Sometimes, some programming languages are more suitable for a specific task.
There are many special purpose languages. In this course we will study one such
language by the name of Snobol.

3. Increased ability to learn new languages

Study of different programming languages also helps one in learning new languages by
learning the syntax and semantics of different languages and understanding different
design methodologies.

4. Understanding the significance of implementation

In some cases, an understanding of implementation issues leads to an understanding of
why languages are designed the way they are. This ultimately leads to efficient use of the
language. One such example is Row vs. column major. If a programmer knows that two-
dimensional arrays are stored column-wise (column major) in FORTRAN (where in most
other languages it is row major) then he will be careful to process it column-wise, hence
making it more efficient.

                                                                                          3

Same is the case with recursion. If the programmer knows how recursion is implemented
and the associated cost of recursive programs, he can use this knowledge to come-up with
more efficient programs if needed.

Also, certain bugs can only be found and fixed if the programmer knows some related
implementation details.

5. Increased ability to design new languages

By learning a number of programming languages, one gets to know the pros and cons of
different language features and issues related to these features. This knowledge will
therefore help if one has to design a new language for any purpose.

                                                                                      4

Language Evaluation Criterion
In order to evaluate and compare different languages, we need some mechanism for their
evaluation. The first criterion that comes to mind is: how long it takes to develop a
program in a given programming language.

Capers Jones has developed the following Programming Languages Table which relates
languages                   with                 the                 productivity.

   Language Level Relationship to Productivity

LANGUAGE LEVEL                      PRODUCTIVITY AVERAGE PER STAFF MONTH
-------------------------- ------------------------------------------------------------------
1-3                                 5 to 10 Function Points
4-8                                 10 to 20 Function Points
9 - 15                              16 to 23 Function Points
16 - 23                             15 to 30 Function Points
24 - 55                             30 to 50 Function Points
Above 55                            40 to 100 Function Points

As can be seen, a higher-level language will yield more productivity as compared to a
lower level language. Some of the common languages with their levels are listed below.

Assembly(1), C(2.5), Pascal(3.5), LISP(5), BASIC(5), C++(6)

As can be seen, C++ has the highest level in this list.

Let us now try to use this criterion to evaluate different languages.

When a programmer starts to learn a new language, a typical first exercise is to program
the computer to display the message "Hello World". A compilation of “Hello World
programs” designed by various categories of “developer” follows.

                                                                                                5

Hello World Programs – adapted from: Infiltec Humor Page
www.infiltec.com

A compilation of *Hello World programs* designed by
                   various categories of *developer* follows.

    High School/Jr.High - BASIC Language
    ====================================

    10 PRINT "HELLO WORLD"
    20 END

More CS508 files

All CS508 files · Midterm Prep 2026 · MCQs Bank