Andrei Pall

Linux Software Engineering

Integer literal suffixes in C

The Suffixes of the integer literal indicates the type in which it is to be read.

These are represented in many ways according to their data types:

  • int: No suffix is required because integer constant is by default assigned as an int data type.
  • unsigned int: character u or U at the end of an integer constant.
  • long int: character l or L at the end of an integer constant.
  • unsigned long int: character ul or UL at the end of an integer constant.
  • long long int: character ll or LL at the end of an integer constant.
  • unsigned long long int: character ull or ULL at the end of an integer constant.