Join Regular Classroom : Visit ClassroomTech

Initializing and accessing members of a structure type data in C

Like any other variable, a structure variable can also be initialized where they are declared. There is a one-to-one relationship between the members and their initializing values. To access the members, we have to use ” . “(the dot operator).

Don’t know what is structure type data in C? Read: Structure datatype in C

In the above example the members can also be initialized in the variable declaration in any order using the ” . ” operator. Let us consider another structure (STUDENT) type data as st3 here.

You Missed
Also Checkout