Skip to main content
Ctrl+K

C for Computational Systems

Front Matter

  • Title Page
  • Contents
  • Chapter Topics
  • Preface

Part I: Foundations

  • Part I: Foundations
  • 1. Introduction
    • 1.1. Program Shape and Compilation
    • 1.2. Output with printf
    • 1.3. Comments and Formatting
    • 1.4. User Input
  • 2. Variables and Types
    • 2.1. Values, Identifiers, and Declarations
    • 2.2. Primitive Types and Literals
    • 2.3. Formatting Values with printf
    • 2.4. Size and Conversion
    • 2.5. Constants
  • 3. Operators
    • 3.1. Arithmetic Expressions
    • 3.2. Assignment and Update Operators
    • 3.3. Comparisons and Logical Operators
    • 3.4. Bitwise Operators
  • 4. Conditionals
    • 4.1. Conditions and Branch Selection
    • 4.2. Multi-Branch Decisions
    • 4.3. Ternary Expressions
    • 4.4. Switch
  • 5. Loops
    • 5.1. Repetition and Stopping Conditions
    • 5.2. while and do while
    • 5.3. for Loops
    • 5.4. Nested Loops
    • 5.5. Controlled Loop Exits

Part II: Memory and Interfaces

  • Part II: Memory and Interfaces
  • 6. Arrays and Strings
    • 6.1. Fixed Arrays and Indexes
    • 6.2. Traversal with Loops
    • 6.3. Size and Element Count
    • 6.4. Character Arrays and Strings
  • 7. Functions
    • 7.1. Function Shape and Calls
    • 7.2. Parameters and Return Values
    • 7.3. Scope and Decomposition
    • 7.4. Arrays with Functions
    • 7.5. Recursion
  • 8. Pointers
    • 8.1. Addresses and Pointer Variables
    • 8.2. Dereferencing and Mutation
    • 8.3. Pointer Parameters
    • 8.4. Arrays and Pointers
  • 9. Structs and Enums
    • 9.1. Why User-Defined Types
    • 9.2. Structs
    • 9.3. Enums
    • 9.4. Design Example
  • 10. Dynamic Memory
    • 10.1. Why Fixed Storage Falls Short
    • 10.2. Allocate and Free
    • 10.3. Runtime-Sized Collections
    • 10.4. Resize and Cleanup
    • 10.5. Common Mistakes
  • 11. Files
    • 11.1. File Motivation and Paths
    • 11.2. Reading a File
    • 11.3. Writing a File
    • 11.4. Errors and Cleanup

Appendices

  • 1. Development Environment
  • 2. Final Projects
  • 3. Build Reference

Bibliography

  • Bibliography

Index

  • Index
  • Repository
  • Open issue

Index

C | P | T

C

  • chapter topics
  • cover

P

  • preface

T

  • title page

By Tsangyao Chen

© Copyright 2026.