Navigation

  • index
  • next |
  • previous |
  • AM129 documentation »
  • Chapter 6. The C Programming Language

Chapter 6. The C Programming Language¶

  • Overview of the C programming language
    • A brief history of C
    • Resources for C
    • Conventions for the course:
    • Comparing C to Fortran and Python:
    • A simple example, and how to use gcc:
    • Primitive data types
    • Arithmetic and operators in C
    • Statements and control flow
    • A brief aside on printf
    • Functions
    • Arrays (static and VLA)
  • Translation units
    • Header only version
    • Header/source file pair
  • Structures and custom data types
    • A full example
  • Pointers, Dynamic memory, and Segmentation faults
    • Reference and dereference operators
    • Passing by reference
    • Pointer arithmetic and arrays
    • Pointers to structs
    • Dynamic memory
    • A full example
  • The C preprocessor and Macros
    • Preprocessor Macros
  • Strings
    • Functions acting on strings
    • Writing formatted strings
    • Reading from strings
  • File input and output
    • Formatted input/output
    • Reading whole lines from a file
    • Putting it all together
  • Linking against libraries
    • A few useful libraries
    • Creating your own (static) libraries
  • An example program: Finite element method for Poisson’s equation
    • The finite element, super brief version
    • The main file:
    • The SparseMat files:
    • The mesh files:
    • The FE matrix files:
    • Wrapping up

Logo of AM129

Previous topic

A short example of object-oriented programming (OOP) in Python

Next topic

Overview of the C programming language

This Page

  • Show Source

Quick search

Navigation

  • index
  • next |
  • previous |
  • AM129 documentation »
  • Chapter 6. The C Programming Language
© Copyright 2024, Ian May, Dongwook Lee, and Sean Riedel. Created using Sphinx 8.0.2.