CS501 · Syllabus

Programming Fundamentals.

A first course in programming using C++. Covers fundamentals from the machine model and basic syntax through control flow, functions, recursion, arrays, strings, structures and file handling.

Course

CS501

Lectures

27

Language

C++

  1. 01

    What is Programming?

    An introduction to programming — instructions, execution, language processors, and the basic structure of a C++ program.

  2. 02

    Algorithms & Flowcharts

    History of C++, the problem-solving phase, pseudocode, and how flowcharts visualize algorithms.

  3. 03

    Language Processor

    Classifications of programming languages — machine, low-level, high-level — and how compilers, interpreters and assemblers differ.

  4. 04

    Program Lifecycle & Data Types

    Program development process, IDE compilation steps, C++ reserved words, and the full primitive data type hierarchy.

  5. 05

    Data Types & Operators

    Identifiers, primitive types, assignment, I/O via cin/cout, type compatibility, and boolean expressions.

  6. 06

    Expressions & Operators

    Operator precedence, named constants, increment / decrement, augmented assignment, and the compilation lifecycle.

  7. 07

    if, else if & Decision Statements

    Simple if, if-else, blocks, multi-way else-if ladders, and the bool data type in conditions.

  8. 08

    Nested if & Switch

    Nested if statements, the ternary operator, and the switch statement for clean multi-branch selection.

  9. 09

    for Loop, break & continue

    Counter-controlled repetition with the for loop, plus break and continue for altering control flow inside loops.

  10. 10

    while Loop

    The while loop — a pretest, condition-controlled loop that runs zero or more times based on a test expression.

  11. 11

    Generating Random Numbers

    Using rand(), RAND_MAX, and srand() to generate random integers — plus formulas for bounded ranges.

  12. 12

    do…while Loop

    A posttest loop that always executes at least once — ideal for input validation and menu-driven programs.

  13. 13

    Nested Loops

    Placing one loop inside another — used for tables, patterns, and multi-dimensional iteration.

  14. 14

    Arrays — Lists of Values

    A single name for many values of the same type, stored in contiguous memory and accessed by an integer index.

  15. 15

    Arrays II — 2D & Common Tasks

    Copying, two-dimensional arrays of rows and columns, and the classic search / max / count patterns.

  16. 16

    Functions — Introduction

    Breaking programs into reusable building blocks: defining functions, calling them, parameters, return values, and prototypes.

  17. 17

    Functions in Depth

    Advantages of functions, library vs user-defined, the three components, parameter lists, and return statements.

  18. 18

    Types of Functions

    Four function shapes by return type and arguments, pass-by-value, and the scope/lifetime of local, global, and static variables.

  19. 19

    Types of Functions — Part II

    Default arguments, function overloading, ambiguous invocation, and inline functions.

  20. 20

    Functions — Pass by Reference

    Passing arguments by address using pointers so a function can modify the caller's variables; plus passing 1D and 2D arrays.

  21. 21

    Recursion

    Functions that call themselves — elegant solutions for problems naturally defined in terms of smaller subproblems.

  22. 22

    Strings — Character Arrays

    Storing text as null-terminated character arrays — declaration, initialization, input with cin / getline, and 2D arrays of strings.

  23. 23

    Structures in C++

    User-defined types that bundle several related values of different types into one record.

  24. 24

    Array of Structures & Nested Structures

    Arrays whose elements are structs — for storing many records — and structures that contain other structures as members.

  25. 25

    File Input & Output

    Reading from and writing to files on disk using fstream, ifstream and ofstream — the persistent twin of cin and cout.

  26. 26

    File Handling — Pointers, Modes & Binary

    Get / put pointers, seekg / seekp, binary file I/O with read() and write(), and the difference between text and binary modes.

  27. 27

    Code Refactoring Techniques

    Improving the structure of existing code without changing its behavior — seven practical techniques every engineer should know.