Identifiers of C language
An Identifier is a logical name provided to a memory location. Identifiers are the names given to various program elements such as variables, symbolic constants, functions, array , structure , union , pointer , enumeration , files etc. Compiler can identify them using identifier เคฌिเคॉเฅ C language is a case sensitive language .
เคเค เคเคเคกेंเคिเคซाเคฏเคฐ เคเค เคฒॉเคिเคเคฒ เคจाเคฎ เคนोเคคा เคนै เคो เคिเคธी เคฎेเคฎोเคฐी เคฒोเคेเคถเคจ เคो เคช्เคฐเคฆाเคจ เคिเคฏा เคाเคคा เคนै, เคฏे เคตिเคญिเคจ्เคจ เคช्เคฐोเค्เคฐाเคฎ เค
เคตเคฏเคต เคैเคธे เคตेเคฐिเคเคฌเคฒ,เคธिंเคฌॉเคฒिเค เคांเคธ्เคेंเค, เคซंเค्เคถเคจ,เค
เคฐे,เคธ्เค्เคฐเค्เคเคฐ, เคฏूเคจिเคฏเคจ, เคชॉเคंเคเคฐ,เคเคจुเคฎेเคฐेเคถเคจ, เคซाเคเคฒ เคเคค्เคฏाเคฆि เคो เคช्เคฐเคฆाเคจ เคिเคฏे เคเค เคจाเคฎ เคนोเคคे เคนै เคिเคจเคธे เคเคฎ्เคชाเคเคฒเคฐ เคเคจเคी เคชเคนเคाเคจ เคเคฐเคคा เคนै। เคธी เคฒैंเค्เคตेเค เคเค เคेเคธ เคธेंเคธिเคिเคต เคฒैंเค्เคตेเค เคนै।
Following rules must be satisfied when the name of variable/identifier is prepared by user:-
- The name of variable / identifier must start with an alphabet . It can be alphabets or alphanumeric values.
- The name of variable / identifier should not be greater then eight letters.
- The name of variable / identifier must not similar to any keyword of C language.
- The name of the variable / identifier should be relevant to the subject.
- There should not be any blank space or any specific symbol between the name of the variable / identifier except underscore( _ ).
เคตेเคฐिเคเคฌเคฒ/เคเคเคกेंเคिเคซाเคฏเคฐ เคा เคจाเคฎเคเคฐเคฃ เคเคฐเคคे เคธเคฎเคฏ เคจिเคฎ्เคจ เคจिเคฏเคฎो เคा เคชाเคฒเคจ เคिเคฏा เคाเคคा เคนै -
- เคตेเคฐिเคเคฌเคฒ/เคเคเคกेंเคिเคซाเคฏเคฐ เคा เคจाเคฎ เค เคฒ्เคซाเคฌेเค เคธे เคช्เคฐाเคฐंเคญ เคนोเคจा เคाเคนिเค। เคฏเคน เคจाเคฎ เค เคฒ्เคซाเคฌेเค เคฏा เค เคฒ्เคซाเคจुเคฎेเคฐिเค เคนो เคธเคเคคा เคนै।
- เคตेเคฐिเคเคฌเคฒ/เคเคเคกेंเคिเคซाเคฏเคฐ เคा เคจाเคฎ 8 เค เค्เคทเคฐों เคธे เค เคงिเค เคจเคนीं เคนोเคจा เคाเคนिเค।
- เคตेเคฐिเคเคฌเคฒ/เคเคเคกेंเคिเคซाเคฏเคฐ เคा เคจाเคฎ เคीเคตเคฐ्เคก เคจเคนीं เคนोเคจा เคाเคนिเค।
- เคตेเคฐिเคเคฌเคฒ/เคเคเคกेंเคिเคซाเคฏเคฐ เคा เคจाเคฎ เคตिเคทเคฏ เคธे เคธเคฎ्เคฌंเคงिเคค เคนोเคจा เคाเคนिเค।
- เคตेเคฐिเคเคฌเคฒ/เคเคเคกेंเคिเคซाเคฏเคฐ เคจाเคฎ เคे เคฎเคง्เคฏ เคोเค เคฐिเค्เคค เคธ्เคฅाเคจ เคฏा เคตिเคถेเคท เคिเคจ्เคน เคा เคชเคฏोเค เคจเคนीं เคिเคฏा เคाเคจा เคाเคนिเค। ( เค ंเคกเคฐเคธ्เคोเคฐ _ เคो เคोเฅเคเคฐ )
Example-
1.) legal identifiers (เคเคिเคค เคเคเคกेंเคिเคซाเคฏเคฐ) :-
float _number;
float a123;
int simple_interest;
2.) illegal identifiers (เค
เคจुเคिเคค เคเคเคกेंเคिเคซाเคฏเคฐ):-
float :x;
float for;
int max marks;
float 7g;
Comments
Post a Comment