Identifiers in C programming are the case-sensitive names given to the variables, functions, array, etc to identify them.

Example:

float length = 2.3;
int max;
double myArray[10];

In above example length, max and myArray are the identifiers.

Rules for naming an identifiers

  1. The first character of an identifiers should be a alphabet(a-z , A-Z) or underscore (_).
  2. Keywords are not allowed to be used as Identifiers.
  3. Identifiers should not be of length more than 31 characters.
  4. Commas or spaces are not allowed within an identifier.
  5. Identifiers are case-sensitive so UPPERCASE and lowercase are treated as different name. For example: APPLE, Apple and apple are three different identifiers.
Example:
123Hello    invalid

int         invalid

main        invalid

_hello      valid

Hello       valid

Hello123    valid

hello.var   invalid

hello var   invalid