What is
Identifier
What is Identifiers
A C identifier refers to name used to identify a variable, function, structures or any
other user-defined item or entity.
Identifier must be unique. They are created to give unique name to a
entity/item/variable name to identify it during the execution of the program
identifier names must be different from keywords. Because Keywords are
predefined, reserved words used in programming .As for Example :You cannot
use double as an identifier because double is a keyword.
Identifiers Example
int roll_no;
double percentge_marks;
float average;
Here, roll_no , percentge_marks , average are identifiers.
Here are some another examples of acceptable identifiers
zakir Ram abc movie_name ab_123
myname50 _temp p a666b9 sum avg multi
Rules for writing an identifier
 The first letter of an identifier should be either a letter or an underscore.
 A valid identifier can have letters (both uppercase and lowercase letters), digits
and underscores.
 There is no rule on length of an identifier. However, the first 31 characters of
identifiers are significant by the compiler.
 Must not contain white space
 Can not use Keyword as a identifier
identifiers in Programming
#include<stdio.h>
int main () {
/* variable definition: */
int variable_1, variable_2;
int variable_3;
variable_1=6;
variable_2=6;
variable_3 = variable_1 + variable_2;
printf("value of c : %d n", variable_3 );
return 0;
}
In this Example identifiers are:
variable_1
variable_2
variable_3
OutPut
value of c : 12
Press any key to continue . . .
Thank You

What is identifier c programming

  • 1.
  • 2.
    What is Identifiers AC identifier refers to name used to identify a variable, function, structures or any other user-defined item or entity. Identifier must be unique. They are created to give unique name to a entity/item/variable name to identify it during the execution of the program identifier names must be different from keywords. Because Keywords are predefined, reserved words used in programming .As for Example :You cannot use double as an identifier because double is a keyword.
  • 3.
    Identifiers Example int roll_no; doublepercentge_marks; float average; Here, roll_no , percentge_marks , average are identifiers. Here are some another examples of acceptable identifiers zakir Ram abc movie_name ab_123 myname50 _temp p a666b9 sum avg multi
  • 4.
    Rules for writingan identifier  The first letter of an identifier should be either a letter or an underscore.  A valid identifier can have letters (both uppercase and lowercase letters), digits and underscores.  There is no rule on length of an identifier. However, the first 31 characters of identifiers are significant by the compiler.  Must not contain white space  Can not use Keyword as a identifier
  • 5.
    identifiers in Programming #include<stdio.h> intmain () { /* variable definition: */ int variable_1, variable_2; int variable_3; variable_1=6; variable_2=6; variable_3 = variable_1 + variable_2; printf("value of c : %d n", variable_3 ); return 0; } In this Example identifiers are: variable_1 variable_2 variable_3 OutPut value of c : 12 Press any key to continue . . .
  • 6.