Code References

Lecture code mapped to the summaries.

Use these folders while reading the summaries. The fastest way to learn the memory topics is to trace the lecture code beside the explanations.

Code Map

Shell scripts and streams

lecture_code/shell

Arguments, redirection, pipes, stdout/stderr examples, and reusable Bash scripts.

C fundamentals

lecture_code/cpl/smallExamples

Hello world, types, character/integer behavior, conditions, loops, and bitwise examples.

Pointers, arrays, and input

lecture_code/cpl/pointers, lecture_code/cpl/arrays, lecture_code/cpl/input

Pointer aliasing, array decay, strings, scanf failure handling, and wc-style input processing.

Dynamic memory and ADTs

lecture_code/cpl/dynamic, lecture_code/cpl/mutation, lecture_code/cpl/aggregate, lecture_code/cpl/sep_comp

Growing arrays, output parameters, structs, linked lists, headers, and incomplete types.

C++ core and OOP

lecture_code/cpp

Streams, references, constructors, classes, operator overloads, and Big 5 resource ownership.

Where to Start

Open a summary first, then use its lecture-code section to decide which source file to trace. The code is most useful when read with the matching PDF topic beside it.

Shell and Bash Basics

Operating systems, shell commands, paths, streams, redirection, pipes, permissions, SSH, and Bash scripts.

C Programming Foundations

C as a compiled, statically typed language; number systems; basic syntax; functions; and memory layout.

Pointers, Arrays, Input, and Strings

Pointers, address-of and dereference, scanf, robust input loops, array decay, pointer arithmetic, and C strings.

Dynamic Memory Management

Heap allocation, malloc/free, lifetimes, dangling pointers, leaks, growing arrays, and doubling capacity.

Command Line Args and Multi-Dimensional Arrays

argc/argv, double pointers, strings from the OS, pointer-to-pointer 2D arrays, and flat 1D matrix storage.

Mutation and Double Pointers

Returning extra values through pointer parameters, output parameters, and using double pointers to mutate caller-owned pointers.

Structs and ADTs

C structs, member access, struct pointers, arrow operator, linked lists, ADT design, and encapsulation motivation.

Separate Compilation and Headers

Declarations versus definitions, preprocessing, object files, linking, headers, incomplete types, and C encapsulation.

Introduction to C++

Modern C++ style, g++, streams, stream state, manipulators, new/delete, function overloading, and operator overloading.

References and Pass by Reference

References as aliases, reference rules, pass-by-reference, const references, returning references, and stream operators.

Basic Classes

Classes, objects, methods, constructors, member initialization lists, access control, headers, getters/setters, and friends.

The Big 5

Destructors, copy constructors, copy assignment, move operations, copy elision, and the rule of five for resource-owning classes.