# C programming

Learn C through problems first — every concept arises from a concrete challenge. These notes supplement the [C programming course](https://kurser.dtu.dk/course/62712) at DTU.

<p>You can <a href="./llms-full.txt" download=>download the whole content</a>, and explore it with your favorite LLM.</p>


:::{mermaid}
mindmap
  root((C))

    Conveyor Belt
      Input (scanf)
      Datatypes
      if / else

    Inventory Assistant
      Arrays
      for loops
      Indexing & iteration

    RPSSL Game
      switch
      enum
      Functions

    Bubble Sort
      Pass by-value, -reference
      Function pointer

    CLI Cryptography
      argc / argv
      Functions
      Header files

    CSV Filter
      File I/O
      fopen, fgets

    Balls Simulation
      struct & union
      Random numbers
      Ext. library integration

    FrankenText
      Static arrays with dynamic content
      Arrays of pointers
      String manipulation

    Playlist
      Linked list
      malloc & free

    Knight’s Tour
      Stack-based arrays
      Static and automatic variable

    Tooling & Workflow
      Editor
      Compiler
      Debugging
      Git
:::

:::{toctree}
:maxdepth: 1
:hidden:
tools
week01
week02
week03
week04
week05
week06
week07
week08
week09
week10
week11
week12
week13
:::

:::{toctree}
:maxdepth: 1
:caption: 'Appendix'
:hidden:
project-template
submission-checklist
study-guide-for-the-exam
Standard library reference <https://devdocs.io/c>
overview-of-editor-shortcuts
web-based-c-tools
activity-descriptions
miscellaneous-topics
additional-exercises
links
solutions
:::

## Credits

Topics are partly based on the book [*C how to program* by Deitel et al.](https://sampling.vitalsource.com/en-au/referral?term=9781292436999).

<!--
The first sections could be structured according to the
https://en.wikiversity.org/wiki/Programming_Fundamentals
-->
