What is Identifier?

Identifier is nothing but a name. In programming language variable name is acting as a identifier. Any name in C language can be represented as identifier, that name can be used to identify the particular things.

Example of Identifier:


	a variables name, a function name, a array name
	pointer name, structure, union, enum, label name etc.
    

How do you write Identifier in C?

In every programming language have their own identifier rules. C language also follow some rules.

Rules for identifier in C:

Example of Valid Identifier:


	int a; int abc; int _xyz; int btn123; int dfg_123;
    

Example of Invalid Identifier:


	int 123; int 12abc; int $xyz; int xyz@;
    

Example of case sensitive Identifier:

	
    int num = 10;
    int Num = 20;
    int NUM = 30;
    

In above example you will see different-different variables and all variables have same name. They are different in just case sensitive way. So the output will be different.

Advertisement here

Share this Page.

Post Your Comment