C Example: Markdown TOC Generator: skip code fences, extract headings
A Markdown outline extractor: scans the document line by line, recognises heading levels # through ####, skips fake headings inside ``` code fences, and prints an indented table of contents plus a heading count. Demonstrates state-machine line parsing and indentation math.
🖥 Run OnlineGCC 10.2 · C11 standard · click ▶ to run · Copy code
🖨 Reference OutputMatches the online run in a standard C11 environment
- C Data Structures
- Arrays
- Fixed-size arrays
- Dynamic arrays
- Linked Lists
- Singly linked
- Doubly linked
- Trees
- Binary search tree
9 headings found
🧩 Keep Learning