Exercises and notes from the book "Learn C the Hard Way", by Zed Shaw
This exercise requires that the accompanying video is watched
type *ptr
: A pointer of type named ptr*ptr
: The value of whateverptr
is pointed at*(ptr + i)
: The value of whateverptr
is pointed at plusi
&thing
: The address ofthing
type *ptr = &thing
: A pointer oftype
namedptr
set to the address ofthing
ptr++
: increment to whereptr
points
ptr->elem
: Use pointer to struct/union to getelem
Use an ->
when you have a pointer to a struct