The keyword typedef is used to define a type synonym. In such a definition, the identifiers name types instead of objects . One such use is to define an abbreviated name for a lengthy or confusing type definition. Type definitions share the same name space as variables, and defined types are fully compatible with their equivalent types.
Types defined as qualified types inherit their type qualifications.
Type definitions can also be built from other type definitions. It is illegal to mix type definitions with other type specifiers. However, the type definition cannot be used in the function's definition. The function's return type can be specified using a type definition. You can also redefine typedef names in inner scopes, following the scope rules explained in Section 2.3 .