hot post

Identifiers in C language


Identifiers in C language
                                                     Identifiers in C language


Identifiers in C language

Identifiers in C language- Hello friends, today I will tell you how

 we can write Identifiers in C language. C language is also like 

other language, for example Hindi and English

Natural  language is the common way to communicated between 

two different people where’s the computer language  help to 

communicate between human and computer. this is the one-way

 communication because human beings ordered computer and then 

computer perform function according to ordered.


When we learn any new language than we start with basic of those 

language for example in English, first we learn AtoZ. similarly, in 

language first we learn its basic.


During programming we use constant, variable, and keywords. 

These components are identifiers.The set of identifiers is called 

instruction.


There are mainly four type of instruction:






When we learnt instruction then we are able to make a program.



Today's objectives are:

we study about:

  • constant
  • variable
  • key words

constant

Any information is constant.

the value of constant never change, we learn this in math also.


When we make any software then the work of software to manage 

our information. For example, in phone when we see phone book 

software where the number and name of people are saved. The 

software manages the numbers and name of people.


DATA = INFORMATION = CONSTANT

Type of constant

In primary constant, there are three type



Integer constant

Any number which has not decimal expression.

example: 25, 35, -55, ... etc.


real constant

Any number which has decimal expression.

example: 2.34, 3.45, 5.32, .... etc.\


character constant

Any single symbol which has single codes.

example: 'a’, 'n’, '+’, '-’, ......etc.

  • Note: Space is also a character constant
  • '-3' is not a character constant because it has more than one simple

second constant

  •  Array
  • String
  • Pointer
  • union
  • structure
  • enumerator

now, we learn only primary constant.

Variable

When any program run then in RAM it gets some memory in the 

RAM.

Our program get memory due to two regions. First is to store

 instruction and second is to store data. Any program has two 

important parts which is instruction and data.


Take an example: When we add any two numbers then we need data 

to add two numbers. In program, instruction use data. Data is also 

stored in memory. We write a line in program to tell compiler how 

much space is needed to store our data.


When we add two numbers then we have to handle three things 

which will be two numbers and its result. We reserved the space in 

the memory. We give different names to identify the three things for

 example a, b, c called variable. Variable are the name of space 

where we store the data of program.



Rules


Variable name is any combination of alphabet, digit, and underscore.

A valid variable name cannot store with digit.



Key-word

  • Those words which is specific and compiler know the meaning of these words.

  • Keywords is also known as predefined and reserved words.

  • There are 32 keywords in c language



auto         double          float            unsigned
break        goto             if                 void
case         default         int                volatile
char          enum          long             while
continue    else            resister
const         extern        return
do             for              short



 Hope this help you to learn c language and you 

understand Identifiers in C language. 

I am trying my best to explain the c language to you, please stay 

with me and share this post and if there is any mistake then you 

comment on comment box

also follow me to get latest update on c language 

Also read

 (introduction-of-c-language-part-3.)

Post a Comment

0 Comments