Identifiers in C: Types of Identifiers
What is an Identifier?
An identifier is the name given to entities such as variables, functions, arrays, and structures in a C program.
Rules for Naming Identifiers
- Can contain letters, digits, and underscores only.
- Must begin with a letter or an underscore, not a digit.
- Cannot be a reserved keyword.
- Case-sensitive —
countandCountare different identifiers. - No spaces or special symbols allowed.
Types of Identifiers
- Variable identifiers — names given to variables, e.g.
age,total_marks. - Function identifiers — names given to functions, e.g.
calculateSum(). - Array identifiers — names given to arrays, e.g.
marks[10]. - Structure/Union identifiers — names given to user-defined types.
- Label identifiers — names used with
gotostatements.
int age = 21;
float total_marks = 89.5;
← PreviousNone
Next 10 Reasons Why You Should Learn C
Ready to master real-world C Programming development?
Learn C Programming hands-on with mentor-led, live sessions.
.png)