OPC · C programming

Dynamic memory allocation, structures and linked lists in C.

L3 Informatique · Informatique and Défi tracks · ISTIC · University of Rennes · 2026–2027

Course coordinator: Louis Ledoux. Lectures (CM), tutorials (TD), practical sessions (TP), course materials, exam design and marking, and coordination of disability-related study and exam accommodations (PAEH).

Outils et programmation en C (OPC) covers Linux, shell scripting, C programming, pointers, dynamic memory, data structures, compilation and debugging. Official L3 programme · OPC syllabus.

C examples · Download course · Allocation quiz

Print layouts use A4 landscape, with columns × rows. Print one PDF page per sheet.

Run the examples

Requires GCC, Make and Valgrind on Linux or WSL. Open the slides in Firefox and the C files in Vim.

unzip opc-course.zip
cd opc-course
firefox cours/_output/01-allocation.html
cd demos/allocation
vim 01-copy-alias.c
make run FILE=01-copy-alias.c

For allocation, follow files 01 → 18 in this folder. The example index gives the order and commands.

vim 08-dangling.c
make valgrind FILE=08-dangling.c  # Enter 4; inspect the invalid reads

Files 01–04 develop a string copy, fixing a missing byte and a leak. File 05 introduces integers. Files 06–09 each introduce one fault into 05-integers.c; repair and rerun each before continuing.

Linked-list checkpoints are in demos/linked-lists/. Start with 00-empty.c and follow the lecture; the final section includes four review questions.