structure nesting

Given the statement

 
  xy.ab.cd = 26;


Which of the following is true?
a) structure cd is nested within structure ab.
b) structure ab is nested within structure xy

Shouldn't the second option be correct?, while in a book i have it says the first option is correct.
It depends on how you look at it - they could be both wrong or both right; the question is too vague.
(a) If the given statement is assumed to be legal, then cd must be a scalar and not a struct, so the reference to "structure cd" is incorrect.
(b) ab is presumably a struct, which is a member of xy. So this statement is correct, although the possibility exists that ab could be a union, also making this statement incorrect.

AS LB said, the question is too vague.

Last edited on
(a) If the given statement is assumed to be legal, then cd must be a scalar and not a struct, so the reference to "structure cd" is incorrect.
Overloaded assigment operator :P
Topic archived. No new replies allowed.