CLA (C language) study materials
CLA (C language) study resources

CLA (C language) case studies

CLA (C language) · Put your knowledge to work in context.

The CLA – C Certified Associate Programmer is the middle tier of the C++ Institute's three-step C certification ladder, sitting between CLE (entry level) and CLP (professional). The C++ Institute presents its certifications alongside training tracks in C and C++, and the CLA credential is intended to show that a programmer has moved past first-step syntax and can work with the language at an associate level. The CLA (C language) case studies are 5 cases and about 3,456 words.

1

16-bit Accumulator Wrap in an ADC Average

A production firmware team collects 100 samples from a 12-bit ADC. Each sample is stored in a uint16 t array; values range from 1000 to 1200.

610 words, about 3 min
2

Nested strtok and a Dangling Field Pointer

A configuration loader reads one line at a time into char line[128] with fgets , removes the trailing newline, then calls strtok(line, ";") to walk semicolon-separated fields. For each field it calls parse pair(field) , which calls strtok(field, "=") to split the key from the value.

696 words, about 3 min
3

Realloc Growth and a Pointer-Sized memset

A telemetry collector reads an unknown number of 4-byte int samples. It begins with int data = malloc(4 sizeof(int)); , capacity 4 and count 0.

631 words, about 3 min
4

Struct Padding in a Binary Log Format

A data logger stores readings in: The host compiler uses 4-byte int alignment, and sizeof(struct reading) == 12 . The logger writes the struct with fwrite(&r, sizeof r, 1, fp) and later reads it back with fread .

713 words, about 4 min
5

feof Loop, Double-Evaluating Macro, and a Leaked FILE

A log summarizer processes files up to 2 GB with this loop: For a file containing exactly three newline-terminated lines it reports 4 lines. On a file where an I/O error is injected after 10 MB, the loop never terminates.

806 words, about 4 min