SlideShare una empresa de Scribd logo
1 de 10
In a passage of text, individual words and punctuation
marks are called tokens. Similarly, in C programming the
smallest individual units are known as C tokens.
C language has six types of tokens, and programs are
written using these tokens and the syntax of the
language.
Keywords Identifiers Constants Strings
Special
Symbols
Operators
 Keywords serves as the building blocks for a program statements. All
keywords have a fixed meaning and cannot be changed.
 Keywords cannot be used as normal identifier names.
Few Examples of keywords used in C are listed below
 int
 break
 goto
 char
 switch
 void
 Identifier refers to the name of variables, functions and arrays. These are
user defined names and consists of a sequence of letters and digits.
 Both uppercase and lowercase letters can be used, and c language is case
sensitive. A special symbol underscore ( _ ) is also permitted.
Rules For Identifiers
 First character must be an alphabet.
 must consist of only letters, digits or underscore.
 Should not be a keyword and should not have any blank space.
 Example:- int num;
char name;
Where num and name are identifier names.
 Constants refers to fixed values that do not change during the execution of
a program.
Basic types of C constants are shown in the flowchart
Constants
Numeric
Constants
Integer
Constants
Real
Constants
Character
Constants
Single
character
constants
String
constants
 Strings are nothing but array of characters ended with null character (‘0’).
This null character indicates the end of the string.
Strings are always enclosed by double quotes. Whereas, character is
enclosed by single quotes in C.
 Example :- char name[10];
In this example the variable name can store up to 10 bytes.
 The following special symbols are used in C having some special meaning
and thus, cannot be used for some other purpose.
[] () {} , ; : * … = #
Braces{}: These opening and ending curly braces marks the start and end of
a block of code containing more than one executable statement.
Parentheses(): These special symbols are used to indicate function calls and
function parameters.
Brackets[]: Opening and closing brackets are used as array element
reference. These indicate single and multidimensional subscripts.
 The symbols which are used to perform logical and mathematical
operations in a C program are called C operators.
Operators used in C program are
 Arithmetic operators
 Assignment operators
 Relational operators
 Logical operators
 Bit wise operators
 Conditional operators (ternary operators)
 Increment/decrement operators
 Special Operators
C tokens

Más contenido relacionado

La actualidad más candente (20)

INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMING
 
Control statements in c
Control statements in cControl statements in c
Control statements in c
 
String functions in C
String functions in CString functions in C
String functions in C
 
Operators in C Programming
Operators in C ProgrammingOperators in C Programming
Operators in C Programming
 
Constants in C Programming
Constants in C ProgrammingConstants in C Programming
Constants in C Programming
 
Arrays in c
Arrays in cArrays in c
Arrays in c
 
Conditional Statement in C Language
Conditional Statement in C LanguageConditional Statement in C Language
Conditional Statement in C Language
 
Function in C program
Function in C programFunction in C program
Function in C program
 
Strings
StringsStrings
Strings
 
Pointers in C Programming
Pointers in C ProgrammingPointers in C Programming
Pointers in C Programming
 
Character set of c
Character set of cCharacter set of c
Character set of c
 
Basics of C programming
Basics of C programmingBasics of C programming
Basics of C programming
 
C functions
C functionsC functions
C functions
 
Data types in C
Data types in CData types in C
Data types in C
 
Functions in c++
Functions in c++Functions in c++
Functions in c++
 
Break and continue
Break and continueBreak and continue
Break and continue
 
Arrays and Strings
Arrays and Strings Arrays and Strings
Arrays and Strings
 
Storage class in C Language
Storage class in C LanguageStorage class in C Language
Storage class in C Language
 
Array in c
Array in cArray in c
Array in c
 
C language ppt
C language pptC language ppt
C language ppt
 

Destacado

About Tokens and Lexemes
About Tokens and LexemesAbout Tokens and Lexemes
About Tokens and LexemesBen Scholzen
 
Operator in c programming
Operator in c programmingOperator in c programming
Operator in c programmingManoj Tyagi
 
Token system powerpoint
Token system powerpointToken system powerpoint
Token system powerpointMatthew McCall
 
What is token c programming
What is token c programmingWhat is token c programming
What is token c programmingRumman Ansari
 
What is keyword in c programming
What is keyword in c programmingWhat is keyword in c programming
What is keyword in c programmingRumman Ansari
 
Data Types and Variables In C Programming
Data Types and Variables In C ProgrammingData Types and Variables In C Programming
Data Types and Variables In C ProgrammingKamal Acharya
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and FlowchartsDeva Singh
 
Chapter3
Chapter3Chapter3
Chapter3Kamran
 
Autenticação baseada em token com jwt
Autenticação baseada em token com jwtAutenticação baseada em token com jwt
Autenticação baseada em token com jwtGDGFoz
 
Token economies
Token economiesToken economies
Token economiesRyan Sain
 
Ed457 tokeneconomy
Ed457 tokeneconomyEd457 tokeneconomy
Ed457 tokeneconomyjerikadee
 
7. input and output functions
7. input and output functions7. input and output functions
7. input and output functionsWay2itech
 
Concept of c data types
Concept of c data typesConcept of c data types
Concept of c data typesManisha Keim
 
Escape sequences
Escape sequencesEscape sequences
Escape sequencesWay2itech
 
C language control statements
C language  control statementsC language  control statements
C language control statementssuman Aggarwal
 

Destacado (20)

Tokens_C
Tokens_CTokens_C
Tokens_C
 
About Tokens and Lexemes
About Tokens and LexemesAbout Tokens and Lexemes
About Tokens and Lexemes
 
Operator in c programming
Operator in c programmingOperator in c programming
Operator in c programming
 
Token system powerpoint
Token system powerpointToken system powerpoint
Token system powerpoint
 
Recognition-of-tokens
Recognition-of-tokensRecognition-of-tokens
Recognition-of-tokens
 
What is token c programming
What is token c programmingWhat is token c programming
What is token c programming
 
What is keyword in c programming
What is keyword in c programmingWhat is keyword in c programming
What is keyword in c programming
 
Input-Buffering
Input-BufferingInput-Buffering
Input-Buffering
 
Specification-of-tokens
Specification-of-tokensSpecification-of-tokens
Specification-of-tokens
 
Data Types and Variables In C Programming
Data Types and Variables In C ProgrammingData Types and Variables In C Programming
Data Types and Variables In C Programming
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and Flowcharts
 
Chapter3
Chapter3Chapter3
Chapter3
 
Autenticação baseada em token com jwt
Autenticação baseada em token com jwtAutenticação baseada em token com jwt
Autenticação baseada em token com jwt
 
Token economies
Token economiesToken economies
Token economies
 
Ed457 tokeneconomy
Ed457 tokeneconomyEd457 tokeneconomy
Ed457 tokeneconomy
 
7. input and output functions
7. input and output functions7. input and output functions
7. input and output functions
 
Concept of c data types
Concept of c data typesConcept of c data types
Concept of c data types
 
Escape sequences
Escape sequencesEscape sequences
Escape sequences
 
Data type in c
Data type in cData type in c
Data type in c
 
C language control statements
C language  control statementsC language  control statements
C language control statements
 

Similar a C tokens

Complete Tokens in c/c++
Complete Tokens in c/c++Complete Tokens in c/c++
Complete Tokens in c/c++Shobi P P
 
C programming tutorial
C programming tutorialC programming tutorial
C programming tutorialMohit Saini
 
Fundamentals of c programming
Fundamentals of c programmingFundamentals of c programming
Fundamentals of c programmingChitrank Dixit
 
Diploma ii cfpc u-2 datatypes and variables in c language
Diploma ii  cfpc u-2 datatypes and variables in c languageDiploma ii  cfpc u-2 datatypes and variables in c language
Diploma ii cfpc u-2 datatypes and variables in c languageRai University
 
Bsc cs i pic u-2 datatypes and variables in c language
Bsc cs i pic u-2 datatypes and variables in c languageBsc cs i pic u-2 datatypes and variables in c language
Bsc cs i pic u-2 datatypes and variables in c languageRai University
 
Mca i pic u-2 datatypes and variables in c language
Mca i pic u-2 datatypes and variables in c languageMca i pic u-2 datatypes and variables in c language
Mca i pic u-2 datatypes and variables in c languageRai University
 
datatypes and variables in c language
 datatypes and variables in c language datatypes and variables in c language
datatypes and variables in c languageRai University
 
Constants Variables Datatypes by Mrs. Sowmya Jyothi
Constants Variables Datatypes by Mrs. Sowmya JyothiConstants Variables Datatypes by Mrs. Sowmya Jyothi
Constants Variables Datatypes by Mrs. Sowmya JyothiSowmyaJyothi3
 
Btech i pic u-2 datatypes and variables in c language
Btech i pic u-2 datatypes and variables in c languageBtech i pic u-2 datatypes and variables in c language
Btech i pic u-2 datatypes and variables in c languageRai University
 
C presentation book
C presentation bookC presentation book
C presentation bookkrunal1210
 
Getting started with c++
Getting started with c++Getting started with c++
Getting started with c++K Durga Prasad
 

Similar a C tokens (20)

C Tokens
C TokensC Tokens
C Tokens
 
C Slides
C SlidesC Slides
C Slides
 
Complete Tokens in c/c++
Complete Tokens in c/c++Complete Tokens in c/c++
Complete Tokens in c/c++
 
Getting started with C++
Getting started with C++Getting started with C++
Getting started with C++
 
C programming tutorial
C programming tutorialC programming tutorial
C programming tutorial
 
Fundamentals of c programming
Fundamentals of c programmingFundamentals of c programming
Fundamentals of c programming
 
Diploma ii cfpc u-2 datatypes and variables in c language
Diploma ii  cfpc u-2 datatypes and variables in c languageDiploma ii  cfpc u-2 datatypes and variables in c language
Diploma ii cfpc u-2 datatypes and variables in c language
 
Bsc cs i pic u-2 datatypes and variables in c language
Bsc cs i pic u-2 datatypes and variables in c languageBsc cs i pic u-2 datatypes and variables in c language
Bsc cs i pic u-2 datatypes and variables in c language
 
Mca i pic u-2 datatypes and variables in c language
Mca i pic u-2 datatypes and variables in c languageMca i pic u-2 datatypes and variables in c language
Mca i pic u-2 datatypes and variables in c language
 
datatypes and variables in c language
 datatypes and variables in c language datatypes and variables in c language
datatypes and variables in c language
 
Constants Variables Datatypes by Mrs. Sowmya Jyothi
Constants Variables Datatypes by Mrs. Sowmya JyothiConstants Variables Datatypes by Mrs. Sowmya Jyothi
Constants Variables Datatypes by Mrs. Sowmya Jyothi
 
Btech i pic u-2 datatypes and variables in c language
Btech i pic u-2 datatypes and variables in c languageBtech i pic u-2 datatypes and variables in c language
Btech i pic u-2 datatypes and variables in c language
 
C tokens.pptx
C tokens.pptxC tokens.pptx
C tokens.pptx
 
C presentation book
C presentation bookC presentation book
C presentation book
 
C introduction
C introductionC introduction
C introduction
 
Cnotes
CnotesCnotes
Cnotes
 
CProgrammingTutorial
CProgrammingTutorialCProgrammingTutorial
CProgrammingTutorial
 
Getting started with c++
Getting started with c++Getting started with c++
Getting started with c++
 
Getting started with c++
Getting started with c++Getting started with c++
Getting started with c++
 
Basics of c
Basics of cBasics of c
Basics of c
 

Último

Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - GuideGOPINATHS437943
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substationstephanwindworld
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgsaravananr517913
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptMadan Karki
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionMebane Rash
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
lifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxlifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxsomshekarkn64
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsSachinPawar510423
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitterShivangiSharma879191
 

Último (20)

Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - Guide
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substation
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.ppt
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of Action
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
lifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxlifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptx
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documents
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter
 

C tokens

  • 1.
  • 2. In a passage of text, individual words and punctuation marks are called tokens. Similarly, in C programming the smallest individual units are known as C tokens. C language has six types of tokens, and programs are written using these tokens and the syntax of the language.
  • 3. Keywords Identifiers Constants Strings Special Symbols Operators
  • 4.  Keywords serves as the building blocks for a program statements. All keywords have a fixed meaning and cannot be changed.  Keywords cannot be used as normal identifier names. Few Examples of keywords used in C are listed below  int  break  goto  char  switch  void
  • 5.  Identifier refers to the name of variables, functions and arrays. These are user defined names and consists of a sequence of letters and digits.  Both uppercase and lowercase letters can be used, and c language is case sensitive. A special symbol underscore ( _ ) is also permitted. Rules For Identifiers  First character must be an alphabet.  must consist of only letters, digits or underscore.  Should not be a keyword and should not have any blank space.  Example:- int num; char name; Where num and name are identifier names.
  • 6.  Constants refers to fixed values that do not change during the execution of a program. Basic types of C constants are shown in the flowchart Constants Numeric Constants Integer Constants Real Constants Character Constants Single character constants String constants
  • 7.  Strings are nothing but array of characters ended with null character (‘0’). This null character indicates the end of the string. Strings are always enclosed by double quotes. Whereas, character is enclosed by single quotes in C.  Example :- char name[10]; In this example the variable name can store up to 10 bytes.
  • 8.  The following special symbols are used in C having some special meaning and thus, cannot be used for some other purpose. [] () {} , ; : * … = # Braces{}: These opening and ending curly braces marks the start and end of a block of code containing more than one executable statement. Parentheses(): These special symbols are used to indicate function calls and function parameters. Brackets[]: Opening and closing brackets are used as array element reference. These indicate single and multidimensional subscripts.
  • 9.  The symbols which are used to perform logical and mathematical operations in a C program are called C operators. Operators used in C program are  Arithmetic operators  Assignment operators  Relational operators  Logical operators  Bit wise operators  Conditional operators (ternary operators)  Increment/decrement operators  Special Operators