Structures

Motivation

What is a Structure?

A structure is a collection of data elements, encapsulated into one unit.

Creating Structure definitions and variables

Structure Definitions

Structure variables

Legal variations in declaration syntax



Using structures


A shortcut for initializing structs


Accessing internal data using a pointer to a structure


Accessing members of nested structures