Step Into Labs

Step Into C · Module exam · Systems C

Exam: The SLAB Reader

A command-line tool that parses a binary file format and fails gracefully.

Part of Step Into C. The full module exam, its missions and the real compiler and debugger are in the course. Try a free lesson first to see how it works.

A sensor writes its readings in a small binary format called SLAB. Your job is the command-line tool that opens a SLAB file, checks that it really is one, decodes every record and reports the total. Real tools are judged by how they fail, so a wrong file, a short file or a missing file must each produce a clear message and the right exit code.

In this module exam

Missions

  1. Read a SLAB file