[prev] 79 [next]

Structures

A structure
  • is a collection of variables, perhaps of different types, grouped together under a single name
  • helps to organise complicated data into manageable entities
  • exposes the connection between data within an entity
  • is defined using the struct keyword
Example:

typedef struct {
    char name[30];
    int  zID;
} StudentT;