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:
typedef type newtypename;
So, for example, we could define a type called byte, which was exactly one byte in size by redefining the word.
char: typedef unsigned char byte;
The compiler type checking facilities then treat byte as a new type which can be used to declare variables:
byte variable, function();
The typedef statement may be written inside functions or in the global white space of a program.
typedef int newname1;
typedef char newname2;