Practice mode C Language

Which operator is used in C to access a structure member through a pointer to the structure?

Correct answer D. ->

Explanation

The arrow operator -> accesses a member through a pointer, so p->age is shorthand for (*p).age. The dot operator is used with a structure variable itself.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.