Last Updated : 27 Nov, 2018

Consider the following declaration :

struct addr {
     char city[10];
     char street[30];
     int pin ;
};

struct {
char name[30];
int gender;
struct addr locate;
} person , *kd = &person ;

Then *(kd -> name +2) can be used instead of
(A) person.name +2
(B) kd -> (name +2 )
(C) *((*kd).name + 2 )
(D) either (A) or (B), but not (C)


Answer: (C)

Explanation:

*(kd -> name +2) = *((*kd).name + 2 ) 

So, option (C) is correct.

Quiz of this Question


Share your thoughts in the comments