0 votes
in C Plus Plus by
What is typedef in C Programming Language?

1 Answer

0 votes
by

typedef is a C keyword, used to define alias/synonyms for an existing type in C language. In most cases, we use typedef's to simplify the existing type declaration syntax. Or to provide specific descriptive names to a type.

typedef <existing-type> <new-type-identifiers>;

typedef provides an alias name to the existing complex type definition. With typedef, you can simply create an alias for any type. Whether it is a simple integer to complex function pointer or structure declaration, typedef will shorten your code.

Related questions

0 votes
asked Jan 6 in C Plus Plus by GeorgeBell
0 votes
asked Jan 11 in C Plus Plus by GeorgeBell
...