GK Question

technology medium mcq

Which operator is used to access members of a structure through a pointer in C?

  1. .
  2. ->
  3. ::
  4. *

Answer: ->

Arrow operator (->) accesses structure members via pointer: ptr->member equivalent to (*ptr).member. Dot operator (.) is for direct structure variables. Understanding pointer arithmetic and memory layout is crucial for systems programming, embedded development, and technical exams. Common source of segmentation faults if misused.

Topic Programming Logic
Exam Relevance SSC JE, Railway, Banking