My solution to assignment sheet 7 of the Operating Systems Fall 2020 course.
Please find the code in quiz.c
My json parser uses the library json-c
It can be installed via either of the following commands (whichever is more applicable to your case)
sudo apt install -y libjson-c-dev
for Debian/Ubuntu Linux users
or
brew install json-c
for macOS users
Refer to this link for more detailed build instructions.
The executable can be compiled with the following command:
gcc -Wall -o quiz -I/usr/local/include -L/usr/local/lib -ljson-c quiz.c
Simply do: ./quiz
Enjoy!