In Semester 2, Jan - May 2024, I will be teaching CS 1100: Introduction to Programming.

#### When and Where

Classes are held in CS 15 during the following hours.
• Wednesday : 11 -11:50 am
• Thursday: 9 - 9:50 am
• Friday: 8 - 8:50 am

#### Requirements

• Labs: 12 assignments, total weight 30%.
• Quiz 1 (Feb 23): 20%
• Quiz 2 (March 22): 20%
• Final (May 13): 30%

#### Syllabus

Quiz 1:
• Introduction to Computing, including basics of Computer Organization (CPU, ALU, etc.), Machine Lang/Assembly/High-level languages, and program compilation steps.
• Data representation (Decimal, Binary) of signed and unsigned integers (Sign-Magnitude, One's and Two's complement), floating point numbers - conversion from binary to decimal and vice-versa.
• Basic structure of C program including main() function.
• Variables and Constants, Assignment Statements, Operators -- Arithmetic, Logical, Relational, operator precedence).
• Input/output: Format-strings for printf and scanf.
• if-else statements
• Repetitive statements: while, do-while and for loops.

Quiz 2:
• Arrays: one dimensional, two-dimensional and three-dimensional arrays.
• Char data type, Strings and String Manipulation functions, Macros and Enum.
• Functions and Modular Programming.

Final: All of the above plus:
• Recursive Functions
• Structures
• Pointers
• Searching algorithms: Linear and Binary search, where elements are stored in an array.
• Sorting algorithms: Selection and Insertion Sort, where elements are stored in an array.

### Lecture Notes

Lecture Topic Reference
Lec 1 (Jan 17) Introduction to Programming. Slides
Lec 2 (Jan 18) History and Number systems. The computing machine. Slides
Lec 3 (Jan 19) Our first C program. Basic data types, operators, keywords in C. Slides
Lec 4 (Jan 24) More details: operators, scanf, printf, sizeof, ranges of different datatypes. Slides
Lec 5 (Jan 25) Execution of Programs, Compilers. Slides
Lec 6 (Jan 31) Modifying the control flow in Programs.Single selection if. Slides
Lec 7 (Feb 1) Multiple selection switch. More examples of if-then-else. Slides
Lec 8 (Feb 2) First loop construct: while. Slides
Lec 9 (Feb 7) for loop, syntax, semantics, continue with for loop, examples. Slides
Lec 10 (Feb 8) Example problems: Mini calculator Slides
Lec 11 (Feb 9) More examples of loops: testing if a number is prime, finding minimum, GCD etc. Slides
Lec 12, 13, 14, 15 (Feb 14, 15, 16, 21) More examples of loops. Problem Solving in class. Slides
Quiz 1 (Feb 23) All material so far. No Slides
Lec 16 (Feb 28) Introduction to Arrays. Slides
Lec 17 (Feb 29) More on Arrays. Slides
Lec 18 (March 1) Character arrays and standard library support. Matrix operations, character grids, reversing an array. Slides
Lec 19 (March 6) More on character grids, introduction to functions, block and scope of variables. Slides
Lec 20 (March 7) More functions. Slides
Lec 21 (March 14) Macros, enumerated constants, multi-dimensional arrays, Selection sort Slides
Lec 22 (March 15) Recursion. Slides
Lec 23 (March 20) More examples of recursion. Slides
Quiz 2 (March 22) All material so far. No slides
Lec 24 (March 27) Pointers. Slides
Lec 25 (March 28) More on pointers. Slides
Lec 26 (April 3) Discussion on Quiz 2. No slides
Lec 27 (April 4) Revision of recursion. No new slides
Lec 28 (April 5) Revision of recursion, pointers. No new slides
Lec 29 (April 17) Introduction to Structures. Slides
Lec 30 (April 18) More on Structures. Slides

### Teaching Assistants

Lead TAs Lab TAs Theory TAs
CS19D401 Simran Kumari
CS20D405 Saish Jaiswal
CS21D405 Anuja Modi
CS22S023 Akhil Vanukuri
CS23S038 Udit Narayan Singh
CS23M053 Raghav Gupta
CS23M026 Harsh Gupta
CS22M026 Ayush Kumar Mall
CS23D014 Abhishek Karmakar
CS23M015 Anshuman Singh Mamar
CS23M007 Abhishek Koushal
CS23S301 Jit Mondal
CS23M021 Chandra Dutta Mamidi
CS23M041 Neel Vinodkumar Rayal
CS23M056 Rupak Paul
CS22D014 Akshay Kumar E
CS23M006 Abhirup Majumder
CS23M037 Mohammed Umair Pandit

### References

• Paul Deitel and Harvey Deitel. C: How to Program.
• V. Rajaraman: Computer Programming in C.
• R. G. Dromey: How to Solve It By Computer?
• Kernighan and Ritchie: The C Programming Language.