0 votes
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

Related questions

0 votes
asked Jan 7 in C Plus Plus by GeorgeBell
0 votes
asked Jan 9 in C Plus Plus by GeorgeBell
...