BITS C practice — worked reference programs
Original preparation, not an official exam paper. Attempt the question before opening its answer.

Each question directory contains answer.c and cases.json.
Build: cc -std=c17 -Wall -Wextra -pedantic answer.c -o answer
Run: ./answer
For file questions create the fixture files described in each case in a fresh working directory.
Compare stdout, exit status and any expectedFiles. Read the website for full explanations and assumptions.

These are model solutions and test cases, not a compiler service.
