Actions

EmSys

C - Structures2

From EdWiki

Revision as of 09:31, 23 June 2015 by Jshankar (Talk | contribs) (1 revision imported: EdWiki -- Emsys pages from Shukra)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Structures ...

struct POINT {
   int x;
   int y;
};

Here the tag POINT names the structure.

A structure declaration that is not followed by a list of variables reserves no storage; it merely describes a template or the shape of a structure.

e.g,

struct POINT xy;

Defines a variable xy which is a structure of type struct POINT.

A structure declaration defines a type.