Programming in C
A hands-on introduction to low-level programming, focusing on memory management, pointers, and the interface between software and the operating system.
This course serves as a practical gateway into the world of C programming and systems-level development. Moving beyond basic syntax, the curriculum emphasizes the importance of the compilation process, debugging in Linux environments, and manual memory management. Students progress from foundational control flow and modularity to mastering complex topics such as pointers, dynamic memory allocation, and the prevention of memory leaks. The course concludes with a deep dive into the runtime environment, exploring how programs interact with the OS through the heap, stack, and standard libraries.
Instructor
Prof. Nitin Chandrachoodan, Department of Electrical Engineering, IIT Madras
Course Schedule & Topics
The course moves from hardware fundamentals to advanced programming concepts, with a heavy emphasis on hands-on coding.
| Week | Primary Focus | Key Topics Covered |
|---|---|---|
| 1 | Computer Mechanics | How computers work, split memory architecture, loops/branches, and introduction to C. |
| 2 | Data Representation | Negative numbers, Hexadecimal, Floating point, Character encoding, and the role of the OS. |
| 3 | C Fundamentals | Writing the first program, program structure, variables, and operators. |
| 4 | Control Flow | Structured programming, conditional logic, and advanced loop implementation in C. |
| 5 | Modular Programming | Functions, Runtime environments, recursion, and variable scopes. |
| 6 | The Power of Pointers | Pointers & Variables, Endianness, Memory Alignment, and Compiler Optimizations. |
| 7 | Arrays & Strings | Pointer arithmetic, 1D arrays, string handling, and standard string functions. |
| 8 | User-Defined Types | Structures (Struct), Typedef, Unions, and Enumerations (Enum). |
| 9 | Memory Management | Heap vs. Stack, Dynamic Memory Allocation (malloc/free), and Multidimensional arrays. |
| 10 | Files & Bits | File handling (Text vs. Binary modes) and Bitwise manipulation. |
| 11 | Systems Programming | Macros, Include files, and managing Multifile projects and the compilation process. |
| 12 | Course Revision | Revision of entire course and preparation for End Term exam. |
Material used
-
The C Programming Languageby Brian W. Kernighan and Dennis M. Ritchie (K&R)