1 2 3 4 5 6

struct StructureName VariableName [ size ];

In the case of our Person structure, we could have an initialized array of names formed in the following way:

structPersonPeople[] = {
{ "Andrew", "Choi" },
{ "Fred", "Flintstone" },
:
:
{ NULL, NULL }
};

We can use an explicit NULL value to indicate the end of the array, if we wish.

We can include pointers to a structure within the declaration of the structure. We might use this technique to build linked lists and binary trees

We can use the following structure declaration for a node in a binary tree

*

*

*

*

January 24, 1999

Page 4

copyright University of Alberta