This 5-week course introduces core concepts of the C programming language.
It is designed for second-year Computer Science students who already know Java and/or C++ and will continue with Python afterward.
Each week consists of one lecture (2×45 min) and one lab (2×45 min).
| Week | Topic | Focus Keywords |
|---|---|---|
| 1 | Introduction & C Basics | setup, syntax, compilation, printf/scanf |
| 2 | Control Flow & Functions | branching, loops, functions |
| 3 | Arrays, Strings & Pointers | arrays, strings, pointers |
| 4 | Dynamic Memory & Structures | malloc, struct, typedef, union |
| 5 | Files & Modular Programming | file I/O, preprocessor, headers, modularity |
Lecture
- History and role of C (systems, embedded, portability)
- Program structure (
#include,main, standard library) - Compilation process (source → preprocessor → compiler → linker → executable)
- Data types (
int,char,float,double), variables, and constants - Input/output using
printfandscanf
Lab
- Set up environment (GitHub Codespaces / VS Code + GCC)
- Write, compile, and run “Hello, World”
- Simple arithmetic calculator
- Explore
printf/scanfformat specifiers
Lecture
- Operators and precedence
- Conditional statements (
if,else,switch) - Loops (
for,while,do…while) - Functions: prototypes, parameters, return types, scope (
auto,static) - Comparing Java methods vs C functions
Lab
- Write branching and looping programs
- Create functions (factorial, prime test, calculator)
- Trace program flow and debug using print statements
Lecture
- One-dimensional and multidimensional arrays
- Strings as character arrays and null termination
- Introduction to pointers: addresses, dereferencing, pointer–array relationship
- Function arguments by value vs by pointer
Lab
- Implement manual string functions (
strlen,strcpy) - Work with numeric arrays (min, max, average)
- Pass pointers to functions (swap two values)
Lecture
- Pointer arithmetic and pointer to pointer
- Dynamic memory allocation (
malloc,calloc,realloc,free) structdefinitions and field accesstypedef,union, andenum
Lab
- Create dynamic arrays with
malloc - Define and use a
struct(e.g., Student record) - Build a small in-memory database (array of structs)
Lecture
- File I/O (
fopen,fprintf,fscanf,fread,fwrite) - Preprocessor directives (
#include,#define, conditional compilation) - Separate compilation and header files
- Debugging and best practices
Lab
- Read/write data from files
- Save and load structured records
- Split program into multiple source and header files
- Mini-project: Student management system with file persistence
By the end of the course, students will be able to:
- Write, compile, and debug C programs in a Linux/GCC environment
- Apply control flow, functions, arrays, strings, and pointers effectively
- Manage dynamic memory and create composite data types using
struct - Work with text and binary files
- Organize programs into multiple source files with headers
- Understand how C differs from Java and how it connects to Python
- Demonstrate foundational skills for later systems and software courses