1. WELCOME TO TODAYSWELCOME TO TODAYS
PRESENTATIONPRESENTATION
ONON
WELCOME TO TODAYSWELCOME TO TODAYS
PRESENTATIONPRESENTATION
ONON
VARIABLES,TOKENVARIABLES,TOKEN & IDENTIFIER& IDENTIFIERVARIABLES,TOKENVARIABLES,TOKEN & IDENTIFIER& IDENTIFIER
BYBY
MEHENAZ KHANMEHENAZ KHAN SORNASORNA
2. OBJECTIVES
• LITTLE DISCUSSION ABOUT C
PROGRAMMING
• TALK ABOUT VERIABLES
• TALK ABOUT TOKEN• TALK ABOUT TOKEN
• TALK ABOUT IDENTIFIER
3. DICUSSION ABOUT C
PROGRAMMING
• C is a programming language developed at
AT & T Bell Laboratories of USA in 1972,
designed and written by “Dennis Ritchie”.
• C is highly portable i.e., software for one• C is highly portable i.e., software for one
computer can be run on another computer.
• A C program is basically a collection of
functions.
4. VARIABLES
• A variable is a data name that may be
used to store a data value.
• It may consist of letters, digits and
underscore character.
• It may consist of letters, digits and
underscore character.
5. Rules for defining
variables
• They must begin with a letter.
• The length should not be normally more
than eight characters.
• Uppercase and lowercase are significant.• Uppercase and lowercase are significant.
• The variable name should not be a
keyword.
6. Continue..
• Valid Variables Names:
John Value T_raise
Delhi x1 ph_value
mark sum1 distancemark sum1 distance
• Invalid Variable Names:
123 (area)
% 25th
8. TOKEN
• C tokens are the basic buildings
blocks in C language which are
constructed together to write a C
program.program.
• Each and every smaller individual
units in a C program are known as C
tokens.
11. Continue…
#include<stdio.h>
main()
{
int x=6, y=6, sum;
main, x, y, sum -
Identifier
{},() – Special symbol
int – Keyword
int x=6, y=6, sum;
sum=x+y;
printf(“total=%d);
}
int – Keyword
main, {},(), int, x, y,
sum-- Tokens
12. IDENTIFIER
• A C identifier refers to name used to
identify a variable, function, structures or
any other user defined item or entity.
• Identifier must be unique. They are• Identifier must be unique. They are
created to give unique name to
item/variable/ name to identify it during
the execution of the program.
13. Continue….
Rules for writing an identifier:
• The first latter of an identifier should be
either a letter or an underscore.
• A valid identifier can have both uppercase• A valid identifier can have both uppercase
or lowercase letter.
• Can not use keyword as an identifier.
15. Conclusion
After this presentation we can say
that without Variable, Token and
Identifier C programming is
impossible because these things areimpossible because these things are
indicates the C compiler to run the
program.
16. THANK YOU ALL FORTHANK YOU ALL FOR
YOUR VALUABLE TIMEYOUR VALUABLE TIMEYOUR VALUABLE TIMEYOUR VALUABLE TIME