C CLP case studies
C CLP · Put your knowledge to work in context.
The C Certified Professional Programmer (CLP) is a vendor-style credential that tests whether you can read, reason about, and write C at a professional level rather than merely recall syntax. It suits working developers who already write C in embedded, systems, networking, or tooling contexts, and students who want an externally recognized signal of C competence. The C CLP case studies are 5 cases and about 4,069 words.
1One Definition, Three Translation Units
Your team maintains a three-file firmware project: main.c, adc.c, and uart.c. All three include board.h.
783 words, about 4 min2The Macro That Counts Twice
A code review finds this metrics header in a telemetry gateway: A test contains: The author says the test shows r == 6 and c == 100 , so the macros are acceptable. A reviewer replies that the macros are unsafe even where the result happens to look right, and that another call site can invoke undefined behavior.
752 words, about 4 min3Growing a Vector Without Losing It
A storage service keeps a growable byte buffer: A fuzz test reports a leak when the allocator is limited to 4 MiB. A second bug appears when a caller does buf append(&b, b.data + 2, 5) : after enough growth, the copied bytes are wrong.
845 words, about 4 min4Parsing a Wire Header by Casting
An ARM Cortex-M0 sensor node receives frames through a driver that supplies unsigned char frame , which may point to an odd address inside a shared FIFO. The wire format is one byte with version in the high nibble and payload length in the low nibble, followed by a 16-bit big-endian message id.
843 words, about 4 min5The Log Line That Isn't Terminated
Your team is adding a diagnostic log to a C11 embedded gateway. A junior developer writes: Tags come from a configuration table and are usually 8-20 characters, but a customer-supplied tag can be 80 characters.
846 words, about 4 min