Structures & Unions in C : - C Programming Tutorial
contains number of data types grouped together.
These data types may or may not be of same type.
We can pass structures as arguments to functions.
We can also make structure within a structure.
Use of Typedef in C language
C provides a facility called typedef for creating
new data type names.
typedef means you no longer have to write struct all over the place.Typedefs can make your code more clear. Typedefs can make your code easier to modify
Similarly, typedef can be used to define a class
type (structure, union etc). For example:
Pointers to Structures.
Malloc function. Dynamic memory