Skip to main content
  1. /classes/
  2. Classes, Spring 2026/
  3. CS 4310 Spring 2026: Course Site/

Lecture Notes: 02-09 Struct Review

·69 words·1 min·

Last time: Building an ArrayList / VLA / vector in C.

Today
#

Arrays

  • fixed array on the stack
  • dynamic array on the stack
  • array on the heap
  • try passing them all to functions

Structs

  • struct can contain pointers
  • struct can contain a fixed-size array
  • struct on the stack
    • passing to function copies
  • struct on the heap
    • passing to function references

Linked Lists

  • struct cell
  • cons, free
  • shared structure
Nat Tuck
Author
Nat Tuck