Consider the following code fragment:
struct data { struct data *s; } a, b, c;
Which three lines of code are required to create a circular data structure (a.s points to b, b.s points to c, y c.s points to a)?
a.s
b
b.s
c
c.s
a
a.s = b; b.s = c; c.s = a;
&a.s = b; &b.s = c; &c.s = a;
a.s = *b; b.s = *c; c.s = *a;
a.s = &b; b.s = &c; c.s = &a;
struct data { int i; int j; } a; struct data *b = &a;
How can you calculate the addition of fields i y j of structure a using only variable b?
i
j
b->i + b->j
*b->i + *b->j
b.i + b.j
It cannot be computed.