c/language/struct

A struct is a type consisting of a sequence of members whose storage is allocated in an ordered sequence (as opposed to union, which is a type consisting of a sequence of members whose storage overlaps).

The for a struct is identical to the c/language/union type specifier except for the keyword used:

Syntax
@1@ Struct definition: introduces the new type struct and defines its meaning @2@ If used on a line of its own, as in , declares but doesn't define the struct  (see forward declaration below). In other contexts, names the previously-declared struct, and is not allowed.

Explanation
Within a struct object, addresses of its elements (and the addresses of the bit-field allocation units) increase in order in which the members were defined. A pointer to a struct can be cast to a pointer to its first member (or, if the member is a bit-field, to its allocation unit). Likewise, a pointer to the first member of a struct can be cast to a pointer to the enclosing struct. There may be unnamed padding between any two members of a struct or after the last member, but not before the first member. The size of a struct is at least as large as the sum of the sizes of its members.

Forward declaration
A declaration of the following form

hides any previously declared meaning for the name in the tag name space and declares  as a new struct name in current scope, which will be defined later. Until the definition appears, this struct name has.

This allows structs that refer to each other:

Note that a new struct name may also be introduced just by using a struct tag within another declaration, but if a previously declared struct with the same name exists in the tag, the tag would refer to that name