Phase 6 · PortfolioModule 20

C Capstone Projects

Combine the full course in six portfolio projects that grow from a terminal utility into a tested multi-file systems program.

What you'll build

The final phase turns individual C techniques into finished software. Six projects increase in scope from a single-file interactive program to a documented, tested, portable multi-file application suitable for a public portfolio.

Build evidence, not just features

For each project, save the requirements, commit in small steps, record important design decisions, and include commands that reproduce the build and tests. A modest finished program with clear evidence is stronger than a huge unfinished idea.
The delivery loop for every capstone
STEP 1
Specify
behavior + constraints
STEP 2
Design
interfaces + ownership
STEP 3
Implement
small vertical slices
STEP 4
Verify
tests + tools
STEP 5
Release
docs + artifact

Project 1 — Interactive command-line application

Beginner

Build a calculator, number game, or small grade tracker. This is your focused demonstration of control flow, loops, functions, and defensive terminal input.

Skills you'll apply

Control flowLoopsFunctionsfgetsstrtolValidation

Definition of done

  • A clear menu loop that exits only on an explicit command or end-of-input
  • Line-based input with complete validation and helpful recovery messages
  • Small functions for parsing, domain operations, and presentation
  • Boundary cases documented and tested manually or automatically
  • A README with exact compile and run commands
Stretch goal: Add command history, undo for the last operation, or a deterministic computer opponent.

Project 2 — Text and file analyzer

Intermediate

Create a utility that reads one or more text files and reports lines, words, character classes, frequencies, or search matches—without assuming the whole file fits in memory.

Skills you'll apply

FILE streamsStringsctype.hArraysCommand-line argumentsError paths

Definition of done

  • Process files incrementally and distinguish end-of-file from an input error
  • Accept useful command-line options and reject invalid combinations
  • Count without indexing arrays with a negative signed char value
  • Send results to stdout and diagnostics to stderr
  • Test empty files, long lines, missing files, punctuation, and repeated words
Stretch goal: Support multiple encodings explicitly or produce machine-readable CSV/JSON output with correct escaping.

Project 3 — Dynamic inventory manager

Intermediate

Build a contact, book, or inventory manager whose records live in a growable collection and persist in a documented text format.

Skills you'll apply

StructsDynamic arraysOwnershipreallocSortingPersistence

Definition of done

  • Create, update, remove, search, sort, and list records
  • Grow capacity safely with checked size arithmetic and a temporary realloc pointer
  • Give every allocated object one clear owner and release all paths cleanly
  • Load and save a versioned, documented file format
  • Run representative tests under AddressSanitizer and UndefinedBehaviorSanitizer
Stretch goal: Make saves crash-resistant by writing a temporary file and replacing the destination only after success.

Project 4 — Reusable data-structure library

Advanced

Package a linked list, stack, queue, or hash table behind a small public C API. Treat callers as real library users who need contracts, stable behavior, and predictable ownership.

Skills you'll apply

Opaque typesCallbacksvoid *InvariantsLibrariesUnit tests

Definition of done

  • A public header containing contracts but no unnecessary representation details
  • Documented ownership rules for inserted, returned, and removed values
  • Destructor or context callbacks where the generic design requires them
  • Tests for empty, one-element, growth, collision, iteration, and failure cases
  • Static-library and test targets in Make or CMake
Stretch goal: Add allocator callbacks so tests can simulate allocation failure and verify cleanup after partial construction.

Project 5 — Binary format or protocol parser

Advanced

Parse a deliberately small binary format—such as a bitmap subset, custom archive index, or framed network message—one validated field at a time.

Skills you'll apply

BytesBit masksEndiannessBounds checksSerializationFuzz cases

Definition of done

  • A written byte-level format with sizes, byte order, ranges, and version rules
  • Explicit decoding rather than casting raw bytes to a struct
  • Every offset and length validated before arithmetic or memory access
  • Graceful rejection of truncated, oversized, inconsistent, and unknown input
  • Round-trip tests plus a corpus of malformed files
Stretch goal: Add a mutation-based fuzz test harness and keep every crashing input as a permanent regression case.

Project 6 — Professional multi-file capstone

Portfolio

Choose a real problem—task ledger, log indexer, embedded simulator, terminal database, or network service—and deliver it as a small professional C product.

Skills you'll apply

API designModular CCMakeTestingSanitizersCIDocumentation

Definition of done

  • Written scope, use cases, non-goals, data model, and failure behavior
  • Layered modules with narrow headers and explicit resource ownership
  • Debug, sanitizer, and optimized release build configurations
  • Automated unit and integration tests running in continuous integration
  • Strict-warning builds on at least two compilers or platforms
  • Versioned release artifact, usage documentation, and known limitations
Stretch goal: Benchmark one realistic workload, profile the bottleneck, and publish a before/after report that preserves correctness.

A compact repository can still show excellent separation of responsibilities:

Project structure
c-capstone/
├── CMakeLists.txt
├── README.md
├── LICENSE
├── include/
│   └── task_store.h       # public interface
├── src/
│   ├── main.c             # CLI composition root
│   ├── task_store.c       # domain operations
│   ├── storage.c          # portable file format
│   └── command.c          # parsing and dispatch
├── tests/
│   ├── test_task_store.c
│   └── test_storage.c
├── docs/
│   └── file-format.md
└── .github/workflows/
    └── c.yml

Process & review rubric

Build each capstone in vertical slices. First make one tiny end-to-end behavior work, then expand. Do not write every data structure before proving that the user workflow and storage boundary fit together.

AreaReview questionsWeight
CorrectnessAre requirements and edge cases tested? Are failures explicit?30%
Memory & resourcesAre bounds, lifetimes, ownership, and cleanup correct?20%
DesignAre modules cohesive and interfaces small?15%
VerificationDo warnings, tests, sanitizers, and CI pass reproducibly?15%
Portability & securityAre assumptions documented and untrusted inputs validated?10%
DocumentationCan another developer build, use, and maintain it?10%
  1. Requirements: write observable acceptance criteria and explicit non-goals
  2. Design: sketch modules, APIs, data flow, ownership, and persistent formats
  3. Implementation: commit small working slices instead of one final code dump
  4. Verification: automate normal, boundary, failure, and regression cases
  5. Review: run the rubric, invite feedback, and resolve the highest-risk findings
  6. Release: tag a version and attach a reproducible artifact or source archive

Watch out

Feature count is not the goal. Reduce scope before sacrificing input validation, cleanup, tests, or documentation—the exact qualities a C portfolio should demonstrate.

Present your work

A reviewer should understand the problem, see the result, and reproduce the evidence within minutes. Put the strongest information near the top of the repository.

README.md
# Task Ledger

A portable C17 command-line task manager with atomic file persistence.

## Build
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build
ctest --test-dir build --output-on-failure

## Run
./build/task-ledger add "Write parser"
./build/task-ledger list

## Quality checks
Document strict warnings, sanitizer commands, supported compilers,
known limitations, and the file-format compatibility policy.
  • Lead with the problem, outcome, screenshot or terminal demo, and key engineering choices
  • State the supported C standard, platforms, compilers, and dependencies
  • Include exact configure, build, test, sanitizer, and run commands
  • Explain ownership, file formats, and one meaningful tradeoff
  • Use focused commits and issues to show how the project evolved
  • Never publish credentials, private data, generated build trees, or copied code you cannot explain

Graduation

You began with one source file and a compiler. You can now reason about bytes, pointers, lifetimes, ownership, data structures, algorithms, undefined behavior, portable interfaces, verification, and reproducible releases. That foundation reaches far beyond C syntax.

Key takeaways

  • A portfolio project is complete when another person can build, test, use, and understand it.
  • Requirements, ownership rules, and failure behavior should be designed before complexity grows.
  • Strict warnings, tests, sanitizers, analysis, and CI provide complementary evidence.
  • Portable external formats encode fields explicitly instead of exposing in-memory layout.
  • Finished projects and thoughtful tradeoffs demonstrate engineering judgment better than feature count.

Where to go next

Deepen the direction that matches your goals: operating systems and networking, embedded development, compilers, graphics, databases, or C interoperability. Keep the same habits: define contracts, make ownership visible, measure evidence, and protect every boundary.

Final assessment

Quick check

1. What should be defined before implementing a persistent binary format?

2. Who should own each allocated resource in a capstone?

3. Which evidence best supports a claim that a project is portable?

4. What is the best response when project scope threatens verification quality?

5. What makes a strong final README?

Congratulations—you've completed the MasterCoding C Programming Course. Choose one capstone, define its first small milestone, and turn this foundation into software you are proud to show.