Question 21
Consider structure question #21:
struct Item_21 {
int id;
char name[10];
};
struct Item_21 it = {21, "GATE"};
struct Item_21 *ptr = ⁢What is the value of 'ptr->id'?
Detailed Solution
The pointer 'ptr' targets structure instance 'it'. Dereferencing via 'ptr->id' retrieves the value assigned to field 'id', which is 21.