Concept

How are structures defined and named in C?

ComputerScienceOne / Alternative Declarations

"The elements of the structure (also referred to as components or members) are included inside curly brackets, delimited using semicolons (in contrast to an enumerated type, which is a list, these elements do not constitute a list). A structure may contain any number of elements of any type. The name (identifier) of the structure is provided at the end, ended with a semicolon. We use a modern naming convention: each element is named using lower camel casing while the name of the structure itself uses upper camel casing. In addition, structure declarations are generally placed in a header file along with any function prototypes that use the structure as a parameter or a return type. Once you have defined a structure you can use it as you would a built-in variable type. For example, Student s; declares a Student structure with the variable name s."

Related Ideas

How are structures defined and named in C? | ComputerScienceOne | Bifalgorithm | Bifalgorithm