{ A destination to learn coding }


What are identifiers

Identifiers are the user defined items like variables, functions, labels etc.

There are certain rules to be followed while naming the identifiers. The first character must compulsorily be a letter or an underscore. The subsequent characters can be letters, underscores or digits.

Note:Special characters cannot be used for naming the identifiers.

Correct Way Wrong Way
result resu!t
count1 1count


A variable is a location in memory. A variable can be modified by the program.

Naming the variable

Since variable is an identifier, it follows the same rules.
Note that count and COUNT are two different variables. It is case sensitive.
data_type variable_name;

For example,
int a;
float count;
Note:A variable should always be declared before its first use in the program.

Declaring a Variable
int main()
int a=10;

In the example above, a variable 'a' is declared before its use.

C Codes