What is the use of typedef?The keyword typedef is used for defining user defined data types. A new definition of existing data types is created by using typedef. It is used to define user defined identifiers which can be used in substitution of type specifiers such as int, float etc. It does not reserve memory space. The names defined by typedef are synonyms for the data types.
For example typedef int integer;
Instead of int the new definition integer can be used for better readability.