Structures & Declarations
![Question 1.11, GATE 2000: Given struct node with int i and float j, followed by struct node *s[10], what is s: array of structure pointers, two-field structure of arrays, three-field structure, or array of structures?](../../assets/questions/CS-2000-Q11-1.webp)
Your answer
Answer & solution
Answer: A (no official key was published)
Step 1: Read outward from s. The immediately attached [10] makes s an array of ten elements.
Step 2: The preceding * says each element is a pointer, and the base type struct node says what it points to. Thus s is an array of ten pointers to nodes, A.
The node’s two fields describe each pointed-to object, not extra fields inside s. Writing struct node s[10] without * would instead produce the array of structures in D.