Project exam · C Programming (from zero to systems)
Project exam: semester results in C
The brief
A timed practical exam in the style of a university lab exam or a placement coding round. In two and a half hours you build a results processor for an engineering class: grades, SGPA, a rank list, a CSV file, error handling, and clean valgrind and sanitizer runs. Every task is checked from the output you paste; no hints or answers are shown until you hand it in.
Why it matters
University practical exams and company coding rounds test exactly this: reading a file of records into structs, applying rules without off-by-one mistakes, sorting, writing a file and handling bad input, all against the clock. Practising in the same format shows you where you lose time before the real exam.
Skills you practise
- if/else grade boundaries
- structs and a growing heap array
- fscanf and fprintf
- qsort with two sort keys
- casts in averages
- command-line arguments
- valgrind and sanitizers
You need
- Linux or WSL with gcc and valgrind (sudo apt install build-essential valgrind)
- Two and a half hours without interruptions
What you will have at the end
results.c: a results processor that grades, computes SGPA, ranks the class, writes results.csv, handles bad command lines and runs clean under valgrind and the sanitizers; plus grade.js with the tested grade rule.
How it is marked (rubric, 100 points)
| Tasks passedThe exam score: the percentage of task points passed (Tasks 3 and 4 count double). | 60 |
|---|---|
| Code qualityA Student struct, small functions, no repeated grade logic, every return value checked. | 20 |
| Memory and filesA growing heap array freed at the end, both files closed, and clean valgrind and sanitizer runs. | 20 |
- 8tasks
- 150 mintime limit
- 60%to pass
Rules: a project exam
- Do each task on your own machine, then paste the command output into its box here.
- Work alone, without notes or a search engine, as in the real exam.
- No hints and no answers. You can run your code, but the checks run only when you hand in.
- Every task is checked automatically when you hand in, or when the time is up.
- You see which tasks passed at the end. You can take it again.