C Typedef

C allows us to define our own data types or to rename existing ones by using a compiler directive called typedef. This statement is used as follows:

So, for example, we could define a type called byte, which was exactly one byte in size by redefining the word.

The compiler type checking facilities then treat byte as a new type which can be used to declare variables:

The typedef statement may be written inside functions or in the global white space of a program.