# arafat-khan-pathan/spl__code__c architecture

> Architecture diagram of the GitHub repository arafat-khan-pathan/spl__code__c, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-03-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arafat-khan-pathan/spl__code__c
- Repository: https://github.com/arafat-khan-pathan/spl__code__c

## Overview

This repository is not a single application or library; it is a collection of standalone C practice exercises organized by topic. The architecture is best understood as a curriculum-style content repository with one folder per concept area and one source file per problem.

Main structural layers:

1. Topic folders
- The top level is divided into numbered learning modules:
  - Intro problems
  - Operators
  - Conditions
  - Loops
  - Arrays
  - Nested loops
  - 2D arrays
  - Strings
  - Functions
  - Pointers
  - Structures
  - File handling
  - Recursion
- Each folder represents an isolated skill area in the C language, progressing from basic syntax to more advanced concepts.

2. Problem units
- Inside each topic folder, most files are named as individual problem solutions, such as `problem_1.c`, `problem_2.c`, and so on.
- In some later folders the naming becomes simpler (`1.c`, `2.c`, etc.), but the pattern is the same: each file is a separate exercise solution.
- There is no evidence of cross-file dependencies between problem files. Each `.c` file should be treated as an independent translation unit.

3. Problem statements / learning material
- Most topic folders include a `.docx` file with the topic name, such as `05 Array.docx` or `09 Function.docx`.
- These documents likely contain the exercise statements or lesson prompts for the matching `.c` solutions.
- Architecturally, the `.docx` files are the specification layer, while the `.c` files are the implementation layer.

4. File-based exercise data
- The file-handling section includes `sample.txt`, indicating that some problems use external input data stored in a text file rather than only standard input.
- This is the only visible persistent data asset in the repository, and it is scoped to the file I/O exercises.

Runtime and technology boundaries:
- The repository is entirely C code plus Word documents and one text sample.
- There is no build system, package manager, test harness, or application framework visible in the tree.
- The expected runtime boundary is the C compiler and the standard C library.
- Most programs are likely console programs using stdin/stdout, with file-handling exercises additionally using local filesystem I/O.

How the repository flows conceptually:
- Topic document defines the exercise
- Individual `.c` file implements the solution
- Program runs independently under the C runtime
- Output is usually terminal-based; file exercises may read/write local text files

Important architectural characteristics:
- Highly modular by design, but not through reusable code modules; instead through many independent single-file programs.
- Educational and sequential rather than production-oriented.
- No shared domain model, services, APIs, or persistent application state.
- The main boundary is between problem sets, not between runtime components.

If drawn as an architecture diagram, the best representation would be:
- A top-level “C practice repository” container
- Child subsystems for each topic folder
- Within each subsystem, paired “problem statement” documents and “solution” source files
- A separate file I/O data asset for the file-handling topic
- A runtime boundary showing standalone execution of each `.c` file through the C toolchain

In short, this repository is a categorized archive of independent C exercises, where the core architectural unit is one problem = one source file, supported by topic documentation and, in one area, sample file input.

Main entry points: [`01.Intro problem solves/01 Intro.docx`](https://github.com/arafat-khan-pathan/spl__code__c/blob/HEAD/01.Intro%20problem%20solves/01%20Intro.docx) (Exercise doc), [`02.Operator problem solves/02 Operators.docx`](https://github.com/arafat-khan-pathan/spl__code__c/blob/HEAD/02.Operator%20problem%20solves/02%20Operators.docx) (Exercise doc), [`12.File problem solve/12 File.docx`](https://github.com/arafat-khan-pathan/spl__code__c/blob/HEAD/12.File%20problem%20solve/12%20File.docx) (Exercise doc), [`12.File problem solve/sample.txt`](https://github.com/arafat-khan-pathan/spl__code__c/blob/HEAD/12.File%20problem%20solve/sample.txt) (Sample data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph "Foundations"
  intro["Intro<br/>topic set"]
  operators["Operators<br/>topic set"]
  conditions["Conditions<br/>topic set"]
  loops["Loops<br/>topic set"]
  nested_loops["Nested loops<br/>topic set"]
  intro_doc["Exercise doc<br/>spec document<br/>[01 Intro.docx]"]
  operators_doc["Exercise doc<br/>spec document<br/>[02 Operators.docx]"]
end

subgraph "Collections"
  arrays["Arrays<br/>topic set"]
  strings["Strings<br/>topic set"]
  two_d_arrays["2D arrays<br/>topic set"]
end

subgraph "Advanced C"
  functions["Functions<br/>topic set"]
  pointers["Pointers<br/>topic set"]
  structures["Structures<br/>topic set"]
  file_handling["File handling<br/>topic set"]
  recursion["Recursion<br/>topic set"]
  file_doc["Exercise doc<br/>spec document<br/>[12 File.docx]"]
  sample_txt["Sample data<br/>fixture<br/>[sample.txt]"]
end

subgraph "Runtime"
  toolchain(("C toolchain<br/>runtime"))
  console(("Console I/O<br/>io boundary"))
  fileio(("File I/O<br/>io boundary"))
end

repo["C practice repo<br/>curriculum repo"]

repo -->|"organizes"| intro
repo -->|"organizes"| operators
repo -->|"organizes"| conditions
repo -->|"organizes"| loops
repo -->|"organizes"| arrays
repo -->|"organizes"| nested_loops
repo -->|"organizes"| two_d_arrays
repo -->|"organizes"| strings
repo -->|"organizes"| functions
repo -->|"organizes"| pointers
repo -->|"organizes"| structures
repo -->|"organizes"| file_handling
repo -->|"organizes"| recursion
intro -->|"specifies"| intro_doc
operators -->|"specifies"| operators_doc
file_handling -->|"specifies"| file_doc
file_handling -->|"uses"| sample_txt
intro -->|"runs on"| toolchain
operators -->|"runs on"| toolchain
conditions -->|"runs on"| toolchain
loops -->|"runs on"| toolchain
arrays -->|"runs on"| toolchain
nested_loops -->|"runs on"| toolchain
two_d_arrays -->|"runs on"| toolchain
strings -->|"runs on"| toolchain
functions -->|"runs on"| toolchain
pointers -->|"runs on"| toolchain
structures -->|"runs on"| toolchain
file_handling -->|"runs on"| toolchain
recursion -->|"runs on"| toolchain
intro -->|"prints"| console
operators -->|"prints"| console
conditions -->|"prints"| console
loops -->|"prints"| console
file_handling -->|"reads/writes"| fileio

click intro_doc "https://github.com/arafat-khan-pathan/spl__code__c/blob/main/01.Intro problem solves/01 Intro.docx"
click operators_doc "https://github.com/arafat-khan-pathan/spl__code__c/blob/main/02.Operator problem solves/02 Operators.docx"
click file_doc "https://github.com/arafat-khan-pathan/spl__code__c/blob/main/12.File problem solve/12 File.docx"
click sample_txt "https://github.com/arafat-khan-pathan/spl__code__c/blob/main/12.File problem solve/sample.txt"

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 intro,operators,conditions,loops,nested_loops,intro_doc,operators_doc toneBlue
class arrays,strings,two_d_arrays toneAmber
class functions,pointers,structures,file_handling,recursion,file_doc,sample_txt toneMint
class toolchain,console,fileio toneRose
class repo toneNeutral
```

## Components

### Foundations

Introductory syntax and control-flow topics.

- **Intro**: topic set · Basic starting exercises.
- **Operators**: topic set · Arithmetic and expression practice.
- **Conditions**: topic set · Branching and decision-making exercises.
- **Loops**: topic set · Iteration practice set.
- **Nested loops**: topic set · Multi-level iteration exercises.
- [Exercise doc](https://github.com/arafat-khan-pathan/spl__code__c/blob/HEAD/01.Intro%20problem%20solves/01%20Intro.docx): spec document · Problem statements for intro exercises. · `01.Intro problem solves/01 Intro.docx`
- [Exercise doc](https://github.com/arafat-khan-pathan/spl__code__c/blob/HEAD/02.Operator%20problem%20solves/02%20Operators.docx): spec document · Problem statements for operator exercises. · `02.Operator problem solves/02 Operators.docx`

### Collections

Array and string practice sets.

- **Arrays**: topic set · One-dimensional array exercises.
- **Strings**: topic set · Character-array and string exercises.
- **2D arrays**: topic set · Matrix-style array exercises.

### Advanced C

Functions, pointers, structures, file I/O, and recursion.

- **Functions**: topic set · Function decomposition and call patterns.
- **Pointers**: topic set · Pointer semantics and indirection exercises.
- **Structures**: topic set · Record-like data modeling exercises.
- **File handling**: topic set · Exercises that read and write local files.
- **Recursion**: topic set · Self-referential function exercises.
- [Exercise doc](https://github.com/arafat-khan-pathan/spl__code__c/blob/HEAD/12.File%20problem%20solve/12%20File.docx): spec document · Problem statements for file-handling exercises. · `12.File problem solve/12 File.docx`
- [Sample data](https://github.com/arafat-khan-pathan/spl__code__c/blob/HEAD/12.File%20problem%20solve/sample.txt): fixture · Input sample used by file-handling exercises. · `12.File problem solve/sample.txt`

### Runtime

Execution boundary for standalone C exercises.

- **C toolchain**: runtime · The compiler and standard C runtime used by every exercise.
- **Console I/O**: io boundary · Typical stdin/stdout execution path for most exercises.
- **File I/O**: io boundary · Local filesystem input/output used by file-handling exercises.

### Other components

- **C practice repo**: curriculum repo · A topic-organized collection of independent C exercises.

## Connections

- C practice repo → Intro: organizes · Repository is partitioned into topic folders.
- C practice repo → Operators: organizes · Repository is partitioned into topic folders.
- C practice repo → Conditions: organizes · Repository is partitioned into topic folders.
- C practice repo → Loops: organizes · Repository is partitioned into topic folders.
- C practice repo → Arrays: organizes · Repository is partitioned into topic folders.
- C practice repo → Nested loops: organizes · Repository is partitioned into topic folders.
- C practice repo → 2D arrays: organizes · Repository is partitioned into topic folders.
- C practice repo → Strings: organizes · Repository is partitioned into topic folders.
- C practice repo → Functions: organizes · Repository is partitioned into topic folders.
- C practice repo → Pointers: organizes · Repository is partitioned into topic folders.
- C practice repo → Structures: organizes · Repository is partitioned into topic folders.
- C practice repo → File handling: organizes · Repository is partitioned into topic folders.
- C practice repo → Recursion: organizes · Repository is partitioned into topic folders.
- Intro → Exercise doc: specifies · Topic document defines the exercise prompts.
- Operators → Exercise doc: specifies · Topic document defines the exercise prompts.
- File handling → Exercise doc: specifies · Topic document defines the exercise prompts.
- File handling → Sample data: uses · File-handling exercises consume local sample input.
- Intro → C toolchain: runs on · Each solution is a standalone C program.
- Operators → C toolchain: runs on · Each solution is a standalone C program.
- Conditions → C toolchain: runs on · Each solution is a standalone C program.
- Loops → C toolchain: runs on · Each solution is a standalone C program.
- Arrays → C toolchain: runs on · Each solution is a standalone C program.
- Nested loops → C toolchain: runs on · Each solution is a standalone C program.
- 2D arrays → C toolchain: runs on · Each solution is a standalone C program.
- Strings → C toolchain: runs on · Each solution is a standalone C program.
- Functions → C toolchain: runs on · Each solution is a standalone C program.
- Pointers → C toolchain: runs on · Each solution is a standalone C program.
- Structures → C toolchain: runs on · Each solution is a standalone C program.
- File handling → C toolchain: runs on · Each solution is a standalone C program.
- Recursion → C toolchain: runs on · Each solution is a standalone C program.
- Intro → Console I/O: prints · Most exercises are console-oriented.
- Operators → Console I/O: prints · Most exercises are console-oriented.
- Conditions → Console I/O: prints · Most exercises are console-oriented.
- Loops → Console I/O: prints · Most exercises are console-oriented.
- File handling → File I/O: reads/writes · File exercises interact with the local filesystem.
