[prev] [index] [next]

Structures (cont)

Defining a structure itself does not allocate any memory

We need to declare a variable in order to allocate memory

struct date christmas;

The components of the structure can be accessed using the "dot" operator

christmas.day   =   25;
christmas.month =   12;
chirstmas.year  = 2015;