in C Plus Plus by
What is typedef in C?

1 Answer

0 votes
by

In C programming, typedef is a keyword that defines an alias for an existing type. Whether it is an integer variable, function parameter, or structure declaration, typedef will shorten the name.

Syntax:

typedef <existing-type> <alias-name>

Here,

  • existing type is already given a name. 
  • alias name is the new name for the existing variable.

Example:

typedef long long ll
...