# williamgherman/c-solutions architecture

> Architecture diagram of the GitHub repository williamgherman/c-solutions, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/williamgherman/c-solutions
- Repository: https://github.com/williamgherman/c-solutions

## Overview

This repository is a collection of independent solutions to exercises and projects from chapters 2–27 of C Programming: A Modern Approach, not one integrated application. The typical workflow is a learner selecting a chapter program, compiling it as directed, and running it; individual programs then handle their own input and produce output. The map highlights representative inventory, text-processing, and data-structure examples, including the indexed core modules. Most programs were not sampled, so the graph does not infer connections between them.

Main entry points: [`16/projects/04/inventory.c`](https://github.com/williamgherman/c-solutions/blob/master/16/projects/04/inventory.c) (Array inventory), [`17/projects/03/inventory2.c`](https://github.com/williamgherman/c-solutions/blob/master/17/projects/03/inventory2.c) (List inventory), [`22/projects/10/inventory2.c`](https://github.com/williamgherman/c-solutions/blob/master/22/projects/10/inventory2.c) (File inventory), [`15/projects/01/line.c`](https://github.com/williamgherman/c-solutions/blob/master/15/projects/01/line.c) (Text justification)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inventory["Inventory programs"]
  node_inventory16["Array inventory<br/>[inventory.c]"]
  node_inventory17["List inventory<br/>[inventory2.c]"]
  node_inventory22["File inventory<br/>[inventory2.c]"]
  node_inv_types["Inventory types<br/>[inventory.h]"]
  node_inv_sort["Inventory sort<br/>[quicksort.h]"]
  node_inv_input["Inventory input<br/>[readline.h]"]
  node_input17["List input<br/>[readline.h]"]
  node_input22["File input<br/>[readline.h]"]
end

subgraph group_text["Text processing"]
  node_justify["Text justification<br/>[line.c]"]
  node_line_api["Line interface<br/>[line.h]"]
  node_readline_api["Line input API<br/>[readline.h]"]
end

subgraph group_adt["Data structures"]
  node_stack_api["Stack API<br/>[stackADT.h]"]
  node_stack_client["Stack client<br/>[stackclient.c]"]
  node_stack_impl["Linked stack<br/>[stackADT3.c]"]
  node_stack_basic["Stack client<br/>[stackclient.c]"]
  node_stack_basic_api["Stack interface<br/>[stack.h]"]
  node_queue_client["Queue client<br/>[queueclient.c]"]
  node_queue_api["Queue interface<br/>[queue.h]"]
end

subgraph group_examples["Other solutions"]
  node_rpn["RPN calculator<br/>[stackclient.c]"]
end

node_learner(("Learner"))

node_learner -.->|"runs example"| node_inventory16
node_learner -.->|"runs example"| node_inventory17
node_learner -.->|"runs example"| node_inventory22
node_learner -.->|"runs example"| node_justify
node_learner -.->|"runs example"| node_stack_client
node_learner -.->|"runs example"| node_queue_client
node_learner -.->|"runs example"| node_rpn
node_inventory16 -->|"uses types"| node_inv_types
node_inventory16 -->|"calls sort"| node_inv_sort
node_inventory16 -->|"reads input"| node_inv_input
node_inventory17 -->|"reads input"| node_input17
node_inventory22 -->|"reads input"| node_input22
node_justify -->|"implements interface"| node_line_api
node_stack_client -->|"calls operations"| node_stack_api
node_stack_impl -->|"implements interface"| node_stack_api
node_stack_basic -->|"calls operations"| node_stack_basic_api
node_queue_client -->|"calls operations"| node_queue_api

click node_inventory16 "https://github.com/williamgherman/c-solutions/blob/master/16/projects/04/inventory.c"
click node_inventory17 "https://github.com/williamgherman/c-solutions/blob/master/17/projects/03/inventory2.c"
click node_inventory22 "https://github.com/williamgherman/c-solutions/blob/master/22/projects/10/inventory2.c"
click node_inv_types "https://github.com/williamgherman/c-solutions/blob/master/16/projects/04/inventory.h"
click node_inv_sort "https://github.com/williamgherman/c-solutions/blob/master/16/projects/04/quicksort.h"
click node_inv_input "https://github.com/williamgherman/c-solutions/blob/master/16/projects/04/readline.h"
click node_input17 "https://github.com/williamgherman/c-solutions/blob/master/17/projects/03/readline.h"
click node_input22 "https://github.com/williamgherman/c-solutions/blob/master/22/projects/10/readline.h"
click node_justify "https://github.com/williamgherman/c-solutions/blob/master/15/projects/01/line.c"
click node_line_api "https://github.com/williamgherman/c-solutions/blob/master/15/projects/01/line.h"
click node_readline_api "https://github.com/williamgherman/c-solutions/blob/master/15/projects/04/readline.h"
click node_stack_api "https://github.com/williamgherman/c-solutions/blob/master/19/projects/03/stackADT.h"
click node_stack_client "https://github.com/williamgherman/c-solutions/blob/master/19/projects/03/stackclient.c"
click node_stack_impl "https://github.com/williamgherman/c-solutions/blob/master/19/exercises/06/stackADT3.c"
click node_stack_basic "https://github.com/williamgherman/c-solutions/blob/master/19/projects/01/stackclient.c"
click node_stack_basic_api "https://github.com/williamgherman/c-solutions/blob/master/19/projects/01/stack.h"
click node_queue_client "https://github.com/williamgherman/c-solutions/blob/master/19/projects/06/queueclient.c"
click node_queue_api "https://github.com/williamgherman/c-solutions/blob/master/19/projects/06/queue.h"
click node_rpn "https://github.com/williamgherman/c-solutions/blob/master/19/projects/02/stackclient.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_inventory16,node_inventory17,node_inventory22,node_inv_types,node_inv_sort,node_inv_input,node_input17,node_input22 toneBlue
class node_justify,node_line_api,node_readline_api toneAmber
class node_stack_api,node_stack_client,node_stack_impl,node_stack_basic,node_stack_basic_api,node_queue_client,node_queue_api toneMint
class node_rpn toneRose
class node_learner toneIndigo
```

## Components

### Inventory programs

- [Array inventory](https://github.com/williamgherman/c-solutions/blob/master/16/projects/04/inventory.c): `16/projects/04/inventory.c`
- [List inventory](https://github.com/williamgherman/c-solutions/blob/master/17/projects/03/inventory2.c): `17/projects/03/inventory2.c`
- [File inventory](https://github.com/williamgherman/c-solutions/blob/master/22/projects/10/inventory2.c): `22/projects/10/inventory2.c`
- [Inventory types](https://github.com/williamgherman/c-solutions/blob/master/16/projects/04/inventory.h): `16/projects/04/inventory.h`
- [Inventory sort](https://github.com/williamgherman/c-solutions/blob/master/16/projects/04/quicksort.h): `16/projects/04/quicksort.h`
- [Inventory input](https://github.com/williamgherman/c-solutions/blob/master/16/projects/04/readline.h): `16/projects/04/readline.h`
- [List input](https://github.com/williamgherman/c-solutions/blob/master/17/projects/03/readline.h): `17/projects/03/readline.h`
- [File input](https://github.com/williamgherman/c-solutions/blob/master/22/projects/10/readline.h): `22/projects/10/readline.h`

### Text processing

- [Text justification](https://github.com/williamgherman/c-solutions/blob/master/15/projects/01/line.c): `15/projects/01/line.c`
- [Line interface](https://github.com/williamgherman/c-solutions/blob/master/15/projects/01/line.h): `15/projects/01/line.h`
- [Line input API](https://github.com/williamgherman/c-solutions/blob/master/15/projects/04/readline.h): `15/projects/04/readline.h`

### Data structures

- [Stack API](https://github.com/williamgherman/c-solutions/blob/master/19/projects/03/stackADT.h): `19/projects/03/stackADT.h`
- [Stack client](https://github.com/williamgherman/c-solutions/blob/master/19/projects/03/stackclient.c): `19/projects/03/stackclient.c`
- [Linked stack](https://github.com/williamgherman/c-solutions/blob/master/19/exercises/06/stackADT3.c): `19/exercises/06/stackADT3.c`
- [Stack client](https://github.com/williamgherman/c-solutions/blob/master/19/projects/01/stackclient.c): `19/projects/01/stackclient.c`
- [Stack interface](https://github.com/williamgherman/c-solutions/blob/master/19/projects/01/stack.h): `19/projects/01/stack.h`
- [Queue client](https://github.com/williamgherman/c-solutions/blob/master/19/projects/06/queueclient.c): `19/projects/06/queueclient.c`
- [Queue interface](https://github.com/williamgherman/c-solutions/blob/master/19/projects/06/queue.h): `19/projects/06/queue.h`

### Other solutions

- [RPN calculator](https://github.com/williamgherman/c-solutions/blob/master/19/projects/02/stackclient.c): `19/projects/02/stackclient.c`

### Other components

- **Learner**

## Connections

- Learner → Array inventory: runs example
- Learner → List inventory: runs example
- Learner → File inventory: runs example
- Learner → Text justification: runs example
- Learner → Stack client: runs example
- Learner → Queue client: runs example
- Learner → RPN calculator: runs example
- Array inventory → Inventory types: uses types (evidence: `16/projects/04/inventory.c`)
- Array inventory → Inventory sort: calls sort (evidence: `16/projects/04/inventory.c`)
- Array inventory → Inventory input: reads input (evidence: `16/projects/04/inventory.c`)
- List inventory → List input: reads input (evidence: `17/projects/03/inventory2.c`)
- File inventory → File input: reads input (evidence: `22/projects/10/inventory2.c`)
- Text justification → Line interface: implements interface (evidence: `15/projects/01/line.c`)
- Stack client → Stack API: calls operations (evidence: `19/projects/03/stackclient.c`)
- Linked stack → Stack API: implements interface (evidence: `19/exercises/06/stackADT3.c`)
- Stack client → Stack interface: calls operations (evidence: `19/projects/01/stackclient.c`)
- Queue client → Queue interface: calls operations (evidence: `19/projects/06/queueclient.c`)
