SlideShare a Scribd company logo
1 of 16
Download to read offline
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
OBJECTIVES
• LITTLE DISCUSSION ABOUT C
PROGRAMMING
• TALK ABOUT VERIABLES
• TALK ABOUT TOKEN• TALK ABOUT TOKEN
• TALK ABOUT IDENTIFIER
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.
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.
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.
Continue..
• Valid Variables Names:
John Value T_raise
Delhi x1 ph_value
mark sum1 distancemark sum1 distance
• Invalid Variable Names:
123 (area)
% 25th
Continue….
#include<stdio.h>
main()
{
int x=6, y=6, sum;
x=6, y=6 – Variable x
and y is variable
name and 6 is its
value.int x=6, y=6, sum;
sum=x+y;
printf(“total=%d);
}
value.
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.
Continue…
Types of tokens:
Continue….
• Keywords---- int, while, flost.
• Identifier--- sum, total, avg
• Constant----- 10, 20 (number)• Constant----- 10, 20 (number)
• String-------- “ram”, “hello”
• Special symbols- {}, (), []
• Operators--- +,/, -, *
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
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.
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.
Continue…
#include<stdio.h>
main()
{
int x=6, y=6, sum;
x, y, sum-- Identifier
int x=6, y=6, sum;
sum=x+y;
printf(“total=%d);
}
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.
THANK YOU ALL FORTHANK YOU ALL FOR
YOUR VALUABLE TIMEYOUR VALUABLE TIMEYOUR VALUABLE TIMEYOUR VALUABLE TIME

More Related Content

Similar to Variable, token, & identifier in c programming

Similar to Variable, token, & identifier in c programming (20)

Survey of programming language getting started in C
Survey of programming language getting started in CSurvey of programming language getting started in C
Survey of programming language getting started in C
 
270 1 c_intro_up_to_functions
270 1 c_intro_up_to_functions270 1 c_intro_up_to_functions
270 1 c_intro_up_to_functions
 
270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt
 
270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt
 
C language unit-1
C language unit-1C language unit-1
C language unit-1
 
C LANGUAGE UNIT-1 PREPARED BY M V BRAHMANANDA REDDY
C LANGUAGE UNIT-1 PREPARED BY M V BRAHMANANDA REDDYC LANGUAGE UNIT-1 PREPARED BY M V BRAHMANANDA REDDY
C LANGUAGE UNIT-1 PREPARED BY M V BRAHMANANDA REDDY
 
C languaGE UNIT-1
C languaGE UNIT-1C languaGE UNIT-1
C languaGE UNIT-1
 
C programming language tutorial
C programming language tutorialC programming language tutorial
C programming language tutorial
 
Presentation 2.ppt
Presentation 2.pptPresentation 2.ppt
Presentation 2.ppt
 
C introduction by thooyavan
C introduction by  thooyavanC introduction by  thooyavan
C introduction by thooyavan
 
Introduction to C
Introduction to CIntroduction to C
Introduction to C
 
C_Programming_Notes_ICE
C_Programming_Notes_ICEC_Programming_Notes_ICE
C_Programming_Notes_ICE
 
C intro
C introC intro
C intro
 
Unit-1 (introduction to c language).pptx
Unit-1 (introduction to c language).pptxUnit-1 (introduction to c language).pptx
Unit-1 (introduction to c language).pptx
 
Cpu.ppt INTRODUCTION TO “C”
Cpu.ppt INTRODUCTION TO “C” Cpu.ppt INTRODUCTION TO “C”
Cpu.ppt INTRODUCTION TO “C”
 
Programming in C [Module One]
Programming in C [Module One]Programming in C [Module One]
Programming in C [Module One]
 
C Language
C LanguageC Language
C Language
 
Chapter1.pptx
Chapter1.pptxChapter1.pptx
Chapter1.pptx
 
2 BytesC++ course_2014_c1_basicsc++
2 BytesC++ course_2014_c1_basicsc++2 BytesC++ course_2014_c1_basicsc++
2 BytesC++ course_2014_c1_basicsc++
 
INTRODUCTION TO C++.pptx
INTRODUCTION TO C++.pptxINTRODUCTION TO C++.pptx
INTRODUCTION TO C++.pptx
 

Recently uploaded

會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
中 央社
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
CaitlinCummins3
 

Recently uploaded (20)

DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptx
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge App
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptx
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 

Variable, token, & identifier in c programming

  • 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
  • 7. Continue…. #include<stdio.h> main() { int x=6, y=6, sum; x=6, y=6 – Variable x and y is variable name and 6 is its value.int x=6, y=6, sum; sum=x+y; printf(“total=%d); } value.
  • 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.
  • 10. Continue…. • Keywords---- int, while, flost. • Identifier--- sum, total, avg • Constant----- 10, 20 (number)• Constant----- 10, 20 (number) • String-------- “ram”, “hello” • Special symbols- {}, (), [] • Operators--- +,/, -, *
  • 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.
  • 14. Continue… #include<stdio.h> main() { int x=6, y=6, sum; x, y, sum-- Identifier int x=6, y=6, sum; sum=x+y; printf(“total=%d); }
  • 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