Identifiers
What is identifier ?
In C language identifiers are the names given to variables, constants, functions, and user-defined data. An identifier or name is a sequence of characters invented by the programmer to identify or name a specific object.
Rules for identifiers:-
- The first character must be an alphabet or underscore.
- All characters must be alphabetic characters, digit or underscores.
- Only the first 31 characters are significant.
- You can not use a keyword.
- Must not contain white space.
- Identifiers names must be unique.
Some examples:-
people_number
monthly_pay
tool_4
box_4_weight
maths_2_sum
When we declare a variable or any function in C language program, to use it we must provide a name to it, which identified it throughout the program.
example:-
int sum_1 = "que1" ;
Here, sum_1 is name or identifiers for the variable which store the value "que1" in it. and int is a key word.
Comments
Post a Comment