150k views
4 votes
The operation:

pStruct -> member

is equivalent to



A. (*pStruct).member

B. &pStruct.member

C. *pStruct.member

D. (&pStruct).member

1 Answer

1 vote

Answer:

A. (*pStruct).member

Step-by-step explanation:

pStruct corresponds to a pointer to a structure datatype.

So to get a reference to the actual structure data, we need to dereference the pointer using the * operator. This can be done using (*pStruct).

Now we need to access a field of the structure called member. This can be done using the dot notation. So the syntax for accessing the field 'member' will correspond to:

(*pStruct).member

User Wardell
by
5.1k points