Skip to content
All tags

#pointers

2 posts

A Pointer Is Not Magic, but a Copyable Address | Stanford CS107 Lecture 8

CS107 Lecture 8 starts with address-of and dereference, explains why C pointer parameters are still passed by value, and shows how int *, char *, and char ** can modify caller-owned ints, chars, and pointers respectively.

An Array Is Not a Pointer, but They Cooperate in Expressions | Stanford CS107 Lecture 9

CS107 Lecture 9 uses seven C-string rules to separate array objects, pointer variables, and string literals: arrays often convert to first-element pointers in expressions, but storage, assignment, mutability, and sizeof remain different.