To access members of a structure, we use the dot (.) operator if we’re working with a structure variable. If we use a pointer to a structure, we use the arrow (->) operator. This helps in directly reading or modifying individual fields.
Example:
struct Point p1;
p1.x = 10; // Using dot operator
struct Point *ptr = &p1;
ptr->y = 20; // Using arrow operator