Questions on accessing structs and unions via pointers

  1. For each of the following give the equivalent using the -> notation.
    1. (*sp1).fred
    2. (*sp1).(*fred).age

  2. For each of the following give the equivalent using the dot access operator.
    1. amy->next
    2. amy->first.name

Answers to these questions.


Back to notes on accessing structs through pointers.