Identifiers are names that you give to variables, constants, arrays, and functions, etc. It can also be the name of objects that take different values ​​but only one at a time.

When we develop the program, then we have to do different types of processing by inputting different types of data into the memory of the computer.

Whatever type of process we want to do with the data in the computer, we must first store every data in the memory of the computer. Without storing any data in the computer's memory, we cannot do any kind of process with that data.

Every location of memory in the computer has a unique address. When we Input to process data in the computer, then it goes to the Store and goes to someplace of Data Memory.

But we can never know in a normal way that the data we input is stored at which memory location of the computer, nor can we ever decide on which memory location our data will be stored. Because our operating system itself does the job of allocating data to memory.

At the same time, when the compiler does memory reserve to store our data, at the same time we assign a name to the memory location to be reserved.

Only with this name, we can identify our data in the memory of the computer. The name we give to the memory location of a data is called Identifier.

Once a value key is assigned with a type identifier, it cannot be changed during the execution of the program.

For example, if an integer variable is named 'X' then 'X' is always an integer. There will be variables that will keep different integer values ​​only. Values ​​are stored in computer memory as symbolic names and can be called whenever needed.

The names that we assign to a memory location have to be defined with some rules in mind because the "C" Compiler defines names based on those particular types of rules, as well as different types of processes. Does.

To name an identifier, we have to follow the following rules, which are called Identifier Naming Convention-

Identifier Naming Convention in “C” language

There are some rules for defining identifiers that you have to follow. If you do not follow these rules then there is an error in the program. These rules are as follows.

  1. Any Upper Case and Lower Case Character can be used in the name of any Identifier.
  2. Underscore can also be used in the name of any identifier.
  3. If we want to use digits in the name of an identifier, it is necessary to have at least one Character or Underscore before using the digits.
  4. Apart from this, any type of Special Symbol such as Period, Comma, Blank Space, etc. cannot be used in the name of the identifier. Also, we cannot use the name of a Reserved Word or a Built-In Function in the name of an identifier.
  5. No name can begin with a number.
  6. "C" is a Case Sensitive Language, so the names of Capital Letters and Small Letters are considered different in this language. Like - int sum and int Sum will be two different Variable Name or Identify Are not same.


I am an engineer by profession but being a blogger is my old day's dream to create my site for those who are more curious about my birthplace than I am coming from (India). the current city lives in Navi Mumbai, India

Post a Comment


Previous Post Next Post

نموذج الاتصال