What are identifiers in C language

What are Identifiers in C?

Basically, identifiers are the names of entities in any programming language like C, C++ etc. These names can be a variable name, an array name, functions name, structure etc.

Identifiers in C are the combination of a string including uppercase, lowercase, numeric and underscore.

The C identifiers must be an uppercase, lowercase and combination of both upper, lower including numeric and underscore.

let’s understand it-

1) salary
2) SalARY
3) Sal_Ary
4) Salary_123
5) _salary
6) salary12
7) salAry414

we can make any identifiers in C by above-used methods. Now if you want to make any variable so you can make that variable as –
int salary;
int Sal_Ary; etc

similarly, you can create a function having a name –
void sum(void);
int SUM(void)
void S_um_12(void);

Note: keep in mind, you can not use reserved keywords as identifiers like int, float, char etc.

There are two types of identifiers-
1) internal
2) external

If you are using an identifiers in C that is called from any external source is known as an external identifier. e.g. function calling that is declared in other files.

Internal identifiers are the local variables that we use in the same file. e.g. int x, y; etc.

You can also read

Few other C program code

    Hope that you understand identifiers in C language. Please comment me below if you have any questions.

    Also, don’t forget to share this post in your social family.

    Leave a Comment

    Show Buttons
    Hide Buttons