Thursday, 14 May 2015

Rules for writing identifier in C language

C language  the first letter of identifier should be either a letter or an underscore. But, it is discouraged to start an identifier name with an underscore though it is legal. It is because, identifier that starts with underscore can conflict with system names. In such cases, compiler will complain about it. Some system names that start with underscore are _fileno, _iob, _wfopen etc.

There is no rule for the length of an identifier. However, the first 31 characters of an identifier are discriminated by the compiler. In C language So, the first 31 letters of two identifiers in a program should be different.





0 comments:

Post a Comment