> Identifiers in c ~ Online tutorial

Identifiers in c

Identifiers is used for any variable, function, data definition, etc. In the programming language C,an identifier is a combination of alphanumeric characters, the first being a letter of the alphabet or an underline, and the remaining being any letter of the alphabet, any numeric digit,or the underline.

Two rules must be kept in mind when naming identifiers.

1. The case of alphabetic characters is significant. Using "INDEX" for a variable is notthe same as using "index" and neither of them is the same as using "InDex" for a variable. Allthree refer to different variables.

2. As C is defined, up to eight significant characters can be used and will be considered significant. If more than eight are used, they may be ignored by the compiler. This may or may not be true of your compiler. You should check your reference manual to find out how many characters are significant for your compiler.



program

#include<stdio.h>
#include <conio.h>
void main()
{
int d;//d
is identifier
clrscr();
printf("enter the value");
scanf("%d",&d);
getch();
}

Please Give Us Your 1 Minute In Sharing This Post!
Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: BloggerYard.Com

0 comments: