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:-
  1. The name of variable / identifier must start with an alphabet . It can be alphabets or alphanumeric values.
  2. The name of variable / identifier should not be greater then eight letters.
  3. The name of variable / identifier must not similar to any keyword of C language. 
  4. The name of the variable / identifier should  be relevant to the subject. 
  5. There should not be any blank space or any specific symbol between the name of the variable / identifier except underscore( _ ).
เคตेเคฐिเคเคฌเคฒ/เค†เค‡เคกेंเคŸिเคซाเคฏเคฐ เค•ा เคจाเคฎเค•เคฐเคฃ เค•เคฐเคคे เคธเคฎเคฏ เคจिเคฎ्เคจ เคจिเคฏเคฎो เค•ा เคชाเคฒเคจ เค•िเคฏा เคœाเคคा เคนै -
  1.  เคตेเคฐिเคเคฌเคฒ/เค†เค‡เคกेंเคŸिเคซाเคฏเคฐ เค•ा เคจाเคฎ เค…เคฒ्เคซाเคฌेเคŸ เคธे เคช्เคฐाเคฐंเคญ เคนोเคจा เคšाเคนिเค। เคฏเคน เคจाเคฎ เค…เคฒ्เคซाเคฌेเคŸ เคฏा เค…เคฒ्เคซाเคจुเคฎेเคฐिเค• เคนो เคธเค•เคคा เคนै।
  2. เคตेเคฐिเคเคฌเคฒ/เค†เค‡เคกेंเคŸिเคซाเคฏเคฐ เค•ा เคจाเคฎ 8 เค…เค•्เคทเคฐों เคธे เค…เคงिเค• เคจเคนीं เคนोเคจा เคšाเคนिเค।
  3. เคตेเคฐिเคเคฌเคฒ/เค†เค‡เคกेंเคŸिเคซाเคฏเคฐ เค•ा เคจाเคฎ เค•ीเคตเคฐ्เคก เคจเคนीं เคนोเคจा เคšाเคนिเค।
  4. เคตेเคฐिเคเคฌเคฒ/เค†เค‡เคกेंเคŸिเคซाเคฏเคฐ เค•ा เคจाเคฎ เคตिเคทเคฏ เคธे เคธเคฎ्เคฌंเคงिเคค เคนोเคจा เคšाเคนिเค।
  5. เคตेเคฐिเคเคฌเคฒ/เค†เค‡เคกेंเคŸिเคซाเคฏเคฐ เคจाเคฎ เค•े เคฎเคง्เคฏ เค•ोเคˆ เคฐिเค•्เคค เคธ्เคฅाเคจ เคฏा เคตिเคถेเคท เคšिเคจ्เคน เค•ा เคชเคฏोเค— เคจเคนीं เค•िเคฏा เคœाเคจा เคšाเคนिเค। ( เค…ंเคกเคฐเคธ्เค•ोเคฐ _ เค•ो เค›ोเฅœเค•เคฐ )
Example-
1.) legal identifiers (เค‰เคšिเคค เค†เค‡เคกेंเคŸिเคซाเคฏเคฐ) :-
float _number;
float a123;
int simple_interest;

2.) illegal identifiers (เค…เคจुเคšिเคค เค†เค‡เคกेंเคŸिเคซाเคฏเคฐ):-
float :x;
float for;
int max marks;
float 7g;

Comments

Popular posts from this blog

C Language Topics in Hindi and English

C language IMP Questions for BSc/BA/BCom/BCA/BE/BTech/MSc/MCA (CS/IT) I year students