Monday 29 March 2021

WHAT ARE IDENTIFIER IN C

 What are Identifiers:

Identifiers are names that are given to Variable, Arrays, Functions, Structures etc.

For example-int pen; Here, Pen is an identifier.

An identifier must be unique because the compiler needs to identify it during the execution of a program. And identifiers must be different from keywords, that is, Keyword and Identifiers cannot have the same name.


The identifiers are depicted in c language as follow:

1. Basic the Letter,Number,symbol of c                     language

2. Identifiers

3. Instruction


1. Basic the Letter,Number,Symbol of c language:

  * A to Z

  * a to z

  * 0 to 9

  * (,{,:,"/,\,?,<,>,+,=,*,&,%,!


2. Identifiers:

   (I). Constant

   (II). Variable

   (III). Keyword



(I). Constant:

                   A constant is a data item that will not be changed during execution of a single program. The constan in C language is as follows.


                              


                         *➡️ Integer constant

 Constant ➡️  *➡️ Float point constant

                         *➡️ Character constant

                         *➡️ String constant


* Integer constant:

                      An integer constant without any decimal point is a whole number.


* Float point constant:

                          Numerical values ​​(fractional) numerical values ​​are called floating point constant, where we can also use + and - negative number and positive number. That is the octal number.


 * Character constant:

                        The R character is included in a pair of [''] (single code), which is called character. Each character is associated with a unique value called [ASCII] valuse.


* String constant:

                A sequential character of the character with [""] (Double code) string always ending with zero (Null) (\ °).


(II). Variable:

         Variable is an identifier that represents the address of the memory location.

Identifier:

               A unique name given to a particular block / which is used in C


             * 8 bits - 1 byte


             * 1024 bytes - 1KB


             * 1024KB - 1MB


             * 1024MB - 1GB


             * 1024GB - 1TB




(III). Keyword:

          Keyword C are pre-defined reserved words used in programming.


    ➡️ Compiler known words

    ➡️ Keywords are part of syntax and cannot be used as 'identifier'.

For example: int, float, char, for, if, while, include, auto, break, register, etc.

 🚦Rule:

  * Keyword not allowed.

  * Alphabets and numbers allowed.

  * Allowed except special character '_' (underscore).

  * It should not start with number.

  * White blanks or spaces are not allowed.


Difference between keywords and identifiers

Identifier & Keyword

 3. Instruction:

  1. Data type declaration instruction

  2. Input/Output instruction

  3. Airthmetic instruction

  4. Control instruction


Kinds of identifiers:

C languege defines two types of identifiers.

1. Internal

2. External


1. Internal identifier:

                      If the identifier is used in the external link process, it is called external. These identifiers are also known as external names; Functio name and Global variable are names that are shared between the source file, s. It contains 63 important characters.


2. External identifier:

                      If the identifier is not used in the external link process, it is called internal. These identifiers are also known as internal names; Local variable names are included. It contains at least 31 important characters.


Hindi translation। हिन्दी अनुवाद 👇👇


What are Identifiers:


Identifiers वे नाम हैं जो Variable, Arrays, Functions, Structures आदि को दिए जाते हैं।

उदाहरण के लिए- int pen; यहां, Pen एक Identifier है!

एक Identifier अद्वितीय(unique) होना चाहिए क्योंकि कंपाइलर को एक कार्यक्रम(program)के निष्पादन के दौरान(during) इसको identify करने की आवश्यकता होती है। और identifiers keywords से भिन्न होना चाहिए, अर्थात् Keyword और Identifiers का एक ही नाम नहीं हो सकता है।


The identifiers are depicted in C language as follow:

1. Basic the Letter,Number,symbol of c                    language

2. Identifiers

3. Instruction


1. Basic the Letter,Number,Symbol of c language

   * A to Z

   * a to z

   * 0 to 9

   * (,{,:,"/,\,?,<,>,+,=,*,&,%,!


2. Identifiers

   (I). Constant

   (II). Variable

   (III). Keyword


 (I). Constant:

                  एक constant एक data item है, जिसे किसी एक program के निष्पादन(execution) के दौरान नहीं बदला जाएगा. C language में constan इस प्रकार है।

                             

                     *➡️ Integer constant

Constant➡️*➡️ Float point constant

                     *➡️ Character constant

                     *➡️ String constant

* Integer constant:

                         बिना कोई decimal point के एक integer constant एक whole number है,


* Float point constant:

                         अंशों(fractional) वाले संख्यात्मक मानों(newmeric value) को floating point constant कहा जाता है वहाँ हम + और - negative number और positive number का भी उपयोग कर सकते हैं। वह octal number है।


* Character constant:

                          R अक्षर(character) को [' '](single code) की जोड़ी में शामिल किया जाता है, जिसे character कहा जाता है प्रत्येक character unique value के साथ जुड़ा हुआ है जिसे [ASCII] valuse कहते है


* String constant:

                         [""] ( Double code) string के साथ character का एक क्रमिक क्रम(sequential) हमेशा शून्य(Null) से (\ °) समाप्त होता है

                         

(II). Variable:

              Variable एक Identifier होता है, जो memory location के address को प्रतिनिधित्व (represent) करता है!

Identifier:

           एक particular block को दिया गया अनोखा नाम / जिसका उपयोग C में किया जाता है

            * 8 bits - 1 byte

            * 1024 bytes - 1KB

            * 1024KB - 1MB

            * 1024MB - 1GB

            * 1024GB - 1TB

               

(III). Keyword:

           Keyword C programming में उपयोग किए गए पूर्व-निर्धारित आरक्षित शब्द हैं!

   ➡️ Compiler known words

   ➡️ Keyword syntax का हिस्सा हैं और उन्हें 'identifier' रूप में उपयोग नहीं किया जा सकता है!


उदाहरण के लिए: int, float, char, for, if, while, include, auto, break, register, आदि

🚦Rule:

  * Keyword की अनुमति नही है

  * Alphabets और numbers की अनुमति है

  * Special character को छोड़कर अनुमति है ’_’ (underscore)

  * यह number से शुरू नहीं होना चाहिए

  * White blanks या spaces की अनुमति नहीं है

Keyword & Identifier



3. Instruction:
   1. Data type declaration instruction
  2. Input/Output instruction
  3. Airthmetic instruction
  4. Control instruction

      
       
        Kinds of identifiers:
C languege दो प्रकार के identifiers को परिभाषित करता है।
1. Internal
2. External

     
1. Internal identifier:
                                     यदि identifier का उपयोग external link process में किया जाता है, तो उसे external कहा जाता है। इन identifiers को external names के रूप में भी जाना जाता है; Functio name और Global variable नाम शामिल हैं जो source file,s के बीच साझा किए जाते हैं। इसमें काम से काम 63 महत्वपूर्ण अक्षर है।

2. External identifier:
                                     यदि external link process में identifier का उपयोग नहीं किया जाता है, तो इसे internal कहा जाता है। इन identifiers को internal names के रूप में भी जाना जाता है; local variable के नाम शामिल हैं। इसमें कम से कम 31 महत्वपूर्ण वर्ण हैं।


9 comments:

OPERATOR IN C

  Operators : An operator is the symbol that specify the operation or activity to be perform. Example :                  C language is ve...