In Trimester 3, April - June 2021, I will be teaching CS 1100: Introduction to Programming.

Administrative Information.

When and Where.

Classes are held online on Webex (password will be shared on Moodle) during the following hours.



Quiz 1:
Quiz 2:
Final: All of the above plus:

Lecture Notes.

Lecture Topic Reference
Lec 1 Introduction to Programming. Slides
Lec 2 More on Turtle. Slides
Lec 3 The Computing Machine. Slides
Lec 4 Our first C program. Basic data types, operators, keywords in C. Slides
Lec 5 More details: operators, scanf, printf, sizeof, ranges of different datatypes. Slides
Lec 6 Execution of Programs, Compilers. Slides
Lec 7 Modifying the control flow in Programs. Arithmetic, relational and logical operators, precedence and associativity. Single selection (if). Slides
Lec 8 Multiple selection switch. More examples of if-then-else. Slides
Lec 9 First loop construct: while. Slides
Lec 10 Revision. No new slides
Lec 11 Quiz 1 No slides
Lec 12 for loop, syntax, semantics, continue with for loop, examples. Slides
Lec 13 Example problems: Mini calculator Slides
Lec 14 More examples of loops: testing if a number is prime, finding prime numbers in interval, finding minimum, GCD. Slides
Lec 15 Introduction to arrays, Manipulating integer and character arrays, Generating Histogram of Marks, Evaluating a polynomial. Slides
Lec 16 Revision of loops: printing patterns, Printing first k primes, Finding prime factorization, Printing staircase of numbers, Computing positive square root of an integer, approximately. Slides
Lec 17 Character Arrays, finding length of strings, comparing strings, palindromes, multi-dimensional arrays. Slides
Lec 18 Character arrays and standard library support. Matrix operations: addition, multiplication, transpose, character grids, reversing an array. Slides
Lec 19 More on character grids, introduction to functions, block and scope of variables. Slides
Lec 20 More functions: factorial, finding sum, checking co-primeness, matrix multiplication, finding prime numbers, swapping numbers, binary to decimal conversion, Tic-Tac-Toe, character grids. Slides
Lec 21 Tic-Tac-Toe, macros, enumerated constants, three dimensional arrays. Slides
Lec 22 Revision. No new slides
Lec 23 Quiz 2 No slides
Lec 24 Recursive Functions : factorial, binomial coefficient, Virahanka/Fibonacci numbers, largest element in array. Slides. We used this portal to visualise execution.
Lec 25 Searching: Linear and Binary search Slides. This is the link we used to visualize the difference between linear and binary search.
Lec 26 More on Recursive Functions -- finding max recursively. Why one version is better than other? Binary search. Introduction to sorting. Slides
Lec 27 Sorting: Selection and Insertion sort, overview of merge sort, introduction to pointers. Slides
Lec 28 More on pointers. Slides
Lec 29 Introduction to Structures. Slides
Lec 30 More on Structures. Slides
Lec 31 Wrapping up Structures. Same slides as last class.
Lec 32 Course Summary and Takeaways. Revision of sorting, recursion. Slides.
Lec 33 Revision of structures and pointers. No new slides.
Lec 34 Holiday for self study. No slides.
Lec 35 Final Exam. Best of luck! No slides.