C / Basic: Read and Construct Programs

C โ€” Basic: Read and Construct Programs

Understand the C program model, expressions, decisions, functions, and bounded sequences.

6 lessons ยท No account required

What you will learn

  • Compile a complete program with an explicit standard.
  • Trace values and control flow without guessing.
  • Use function and array contracts to prevent common errors.
  1. The Toolchain and the C Program Model

    Follow source text through translation and execution, and separate language rules from tool and platform choices.

    Start learning
  2. Types, Ranges, and Conversions

    Choose representations by their contracts, and follow the conversions that occur before a value is stored.

    Start learning
  3. Input, Output, and Validation

    Treat external text as untrusted data, and separate reading a bounded record from interpreting its meaning.

    Start learning
  4. Operators and Control Flow

    Make arithmetic and decisions explicit, and use loop invariants to justify every iteration and boundary.

    Start learning
  5. Functions and Contracts

    Use functions to give calculations clear interfaces, and state the conditions under which callers may rely on a result.

    Start learning
  6. Arrays, Strings, and Bounds

    Distinguish a sequenceโ€™s storage capacity from its logical length, and treat null termination as an explicit invariant.

    Start learning
Back to course