# techwithpride/c-programming architecture

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

- Interactive diagram: https://gitdiagram.com/techwithpride/c-programming
- Repository: https://github.com/techwithpride/c-programming

## Overview

This repository contains three independent command-line C programs: a sparse-matrix processor, a library management system, and a number-guessing game. Their workflows begin with terminal input and produce terminal output; the library also maintains book records in memory. The graph separates each program and shows function calls where the excerpts provide evidence. No README documentation is available, and the sampled files show no external services or persistent storage.

Main entry points: [`wada.c`](https://github.com/techwithpride/c-programming/blob/main/wada.c) (Menu workflow), [`pgm.c`](https://github.com/techwithpride/c-programming/blob/main/pgm.c) (Matrix workflow), [`sm.c`](https://github.com/techwithpride/c-programming/blob/main/sm.c) (Guessing game)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sparse["Sparse Matrices"]
  node_matrix_main["Matrix workflow<br/>[pgm.c]"]
  node_matrix_input["Read matrices<br/>[pgm.c]"]
  node_matrix_display["Display matrices<br/>[pgm.c]"]
  node_matrix_add["Add matrices<br/>[pgm.c]"]
  node_matrix_transpose["Transpose matrix<br/>[pgm.c]"]
end

subgraph group_library["Library Management"]
  node_library_main["Menu workflow<br/>[wada.c]"]
  node_book_records["Book records<br/>[wada.c]"]
  node_book_create["Create records<br/>[wada.c]"]
  node_book_display["Display available<br/>[wada.c]"]
  node_book_search["Search books<br/>[wada.c]"]
  node_book_issue["Issue books<br/>[wada.c]"]
  node_book_return["Return books<br/>[wada.c]"]
end

subgraph group_game["Guessing Game"]
  node_game_main["Guessing game<br/>[sm.c]"]
end

node_matrix_user(("Terminal user"))
node_library_user(("Terminal user"))
node_game_user(("Terminal user"))

node_matrix_user -->|"enters input"| node_matrix_main
node_matrix_main -->|"reads matrices"| node_matrix_input
node_matrix_main -->|"displays matrices"| node_matrix_display
node_matrix_main -->|"adds matrices"| node_matrix_add
node_matrix_main -->|"transposes matrices"| node_matrix_transpose
node_library_user -->|"chooses action"| node_library_main
node_library_main -->|"calls on choice"| node_book_create
node_library_main -->|"calls on choice"| node_book_display
node_library_main -->|"calls on choice"| node_book_search
node_library_main -->|"calls on choice"| node_book_issue
node_library_main -->|"calls on choice"| node_book_return
node_game_user -->|"enters guesses"| node_game_main

click node_matrix_main "https://github.com/techwithpride/c-programming/blob/main/pgm.c"
click node_matrix_input "https://github.com/techwithpride/c-programming/blob/main/pgm.c"
click node_matrix_display "https://github.com/techwithpride/c-programming/blob/main/pgm.c"
click node_matrix_add "https://github.com/techwithpride/c-programming/blob/main/pgm.c"
click node_matrix_transpose "https://github.com/techwithpride/c-programming/blob/main/pgm.c"
click node_library_main "https://github.com/techwithpride/c-programming/blob/main/wada.c"
click node_book_records "https://github.com/techwithpride/c-programming/blob/main/wada.c"
click node_book_create "https://github.com/techwithpride/c-programming/blob/main/wada.c"
click node_book_display "https://github.com/techwithpride/c-programming/blob/main/wada.c"
click node_book_search "https://github.com/techwithpride/c-programming/blob/main/wada.c"
click node_book_issue "https://github.com/techwithpride/c-programming/blob/main/wada.c"
click node_book_return "https://github.com/techwithpride/c-programming/blob/main/wada.c"
click node_game_main "https://github.com/techwithpride/c-programming/blob/main/sm.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_matrix_main,node_matrix_input,node_matrix_display,node_matrix_add,node_matrix_transpose,node_matrix_user,node_library_user,node_game_user toneBlue
class node_library_main,node_book_records,node_book_create,node_book_display,node_book_search,node_book_issue,node_book_return toneAmber
class node_game_main toneMint
```

## Components

### Sparse Matrices

- [Matrix workflow](https://github.com/techwithpride/c-programming/blob/main/pgm.c): `pgm.c`
- [Read matrices](https://github.com/techwithpride/c-programming/blob/main/pgm.c): `pgm.c`
- [Display matrices](https://github.com/techwithpride/c-programming/blob/main/pgm.c): `pgm.c`
- [Add matrices](https://github.com/techwithpride/c-programming/blob/main/pgm.c): `pgm.c`
- [Transpose matrix](https://github.com/techwithpride/c-programming/blob/main/pgm.c): `pgm.c`

### Library Management

- [Menu workflow](https://github.com/techwithpride/c-programming/blob/main/wada.c): `wada.c`
- [Book records](https://github.com/techwithpride/c-programming/blob/main/wada.c): `wada.c`
- [Create records](https://github.com/techwithpride/c-programming/blob/main/wada.c): `wada.c`
- [Display available](https://github.com/techwithpride/c-programming/blob/main/wada.c): `wada.c`
- [Search books](https://github.com/techwithpride/c-programming/blob/main/wada.c): `wada.c`
- [Issue books](https://github.com/techwithpride/c-programming/blob/main/wada.c): `wada.c`
- [Return books](https://github.com/techwithpride/c-programming/blob/main/wada.c): `wada.c`

### Guessing Game

- [Guessing game](https://github.com/techwithpride/c-programming/blob/main/sm.c): `sm.c`

### Other components

- **Terminal user**
- **Terminal user**
- **Terminal user**

## Connections

- Terminal user → Matrix workflow: enters input (evidence: `pgm.c`)
- Matrix workflow → Read matrices: reads matrices (evidence: `pgm.c`)
- Matrix workflow → Display matrices: displays matrices (evidence: `pgm.c`)
- Matrix workflow → Add matrices: adds matrices (evidence: `pgm.c`)
- Matrix workflow → Transpose matrix: transposes matrices (evidence: `pgm.c`)
- Terminal user → Menu workflow: chooses action (evidence: `wada.c`)
- Menu workflow → Create records: calls on choice (evidence: `wada.c`)
- Menu workflow → Display available: calls on choice (evidence: `wada.c`)
- Menu workflow → Search books: calls on choice (evidence: `wada.c`)
- Menu workflow → Issue books: calls on choice (evidence: `wada.c`)
- Menu workflow → Return books: calls on choice (evidence: `wada.c`)
- Terminal user → Guessing game: enters guesses (evidence: `sm.c`)
