|
(I) represents &a=b; (II) a=*b; (III) *a=b; (IV) a=&b.
Fixed from the starting position at the top bar, each of (I)-(IV) has two more such lines possible. From (I) &a=&b, &a=*b; from (II) a=&b, a=b; from (III) *a=&b, *a=*b; from (IV) a=b, a=*b. All possible such lines are drawn by:
So there are nine such lines possible in this scheme, each corresponding to a certain assignment of two variables that are either preceded by * or & (remembering that * dereferences a pointer and & returns the address of an object). For curiosity's sake let's visit:
which are &a=*b and *a=&b respectively. I'd like to mention that all parallel lines represent equivalent assignments. For example, (I) and (II) are equivalent and (III) and (IV) are equivalent. In the cases of the two lines in (A), the parallel twins of each would be a=**b and **a=b.