SlideShare una empresa de Scribd logo
1 de 16
Presented by
• Divya Sree
• Rayshini
• Issac
• Mahender
TOKENS
 Tokens are the basic building blocks in C++ language.
The smallest individual units in a program are known as
tokens.
 A program is constructed using a combination of these
tokens.
TOKENS
Keywords
Variables
Constants
Strings
Operators
FIVE TYPE OF TOKENS
Keywords
Variables
Constants
Strings
Operators
FIVE TYPE OF TOKENS
Definition:
Sequence of characters that have a fixed
meaning.
 Keywords must be written in lower
case.
 Reserved identifiers and can’t be used
as names for the
 program variables
 user-defined program elements.
KEY WORDS
Examples:
int, float, char,
double, switch,
break, char, const,
Continue, default,
for, if, goto, static,
void, sizeof, while,
return, int, long, do,
while etc…
Keywords
Variables
Constants
Strings
Operators
FIVE TYPE OF TOKENS
Definition:
A variable is a quantity
whose value may
change during the
program execution.
Examples:
int a, char choice, etc.,
VARIABLES
Variables in
C++
Numeric
Variables
To store either integer
values or floating
point values
Character
Variables
Alphabets and
numbers from 0-9
inserted between
single quotes
 Naming Conventions:
A variable name should
• contain alphabets (a-z , A-Z) and digits (0-9).
• not start with a number or a digit.
• not be a keyword.
• case sensitive.
 Naming Conventions:
A variable name should
• contain alphabets (a-z , A-Z) and digits (0-9).
• not start with a number or a digit.
• not be a keyword.
• case sensitive.
Keywords
Variables
Constants
Strings
Operators
FIVE TYPE OF TOKENS
CONSTANTS
Definition: The quantities whose value do not change
during the program execution are known as constants.
Keywords
Variables
Constants
Strings
Operators
FIVE TYPE OF TOKENS
Definition:
A group of characters that are treated as a single data
item enclosed in double quotes are known as strings.
General syntax:
• char string-name[size];
• size determines the number of characters in the string
name.
Example: char city[9]=“New York”;
STRINGS
Keywords
Variables
Constants
Strings
Operators
FIVE TYPE OF TOKENS
Definition:
An operator is a symbol that performs
operations on one or more operants.
There are 8 types of operators supported by C++
language.
OPERATORS
• Arithmetic operators (+,-,*,/,%)
• Relational operators (==,!=,<,>,<=,>=)
• Logical operators (||,&&,!)
• Conditional operators (? :)
• Assignment operators (=,+=,-=,/=,*=,%=,)
• Increment /decrement operators (++,--)
• Bitwise operators (&,|,^,<<,>>,~)
• Miscellaneous/special operators (sizeof,*,->)
EIGHT TYPES OF OPERATORS

Más contenido relacionado

La actualidad más candente

class and objects
class and objectsclass and objects
class and objects
Payel Guria
 
Inline function
Inline functionInline function
Inline function
Tech_MX
 

La actualidad más candente (20)

Data Type in C Programming
Data Type in C ProgrammingData Type in C Programming
Data Type in C Programming
 
Variables in C Programming
Variables in C ProgrammingVariables in C Programming
Variables in C Programming
 
Data types in C
Data types in CData types in C
Data types in C
 
String functions in C
String functions in CString functions in C
String functions in C
 
Input and output in C++
Input and output in C++Input and output in C++
Input and output in C++
 
Pointers in C Programming
Pointers in C ProgrammingPointers in C Programming
Pointers in C Programming
 
FUNCTIONS IN c++ PPT
FUNCTIONS IN c++ PPTFUNCTIONS IN c++ PPT
FUNCTIONS IN c++ PPT
 
Functions in c++
Functions in c++Functions in c++
Functions in c++
 
What is identifier c programming
What is identifier c programmingWhat is identifier c programming
What is identifier c programming
 
Data types
Data typesData types
Data types
 
Structure in C
Structure in CStructure in C
Structure in C
 
Strings in C
Strings in CStrings in C
Strings in C
 
class and objects
class and objectsclass and objects
class and objects
 
Datatypes in c
Datatypes in cDatatypes in c
Datatypes in c
 
Type conversion
Type conversionType conversion
Type conversion
 
Function overloading(c++)
Function overloading(c++)Function overloading(c++)
Function overloading(c++)
 
Types of function call
Types of function callTypes of function call
Types of function call
 
Inline function
Inline functionInline function
Inline function
 
Constants in C Programming
Constants in C ProgrammingConstants in C Programming
Constants in C Programming
 
C language ppt
C language pptC language ppt
C language ppt
 

Destacado

878 lap-trinh-mang-voi-ngon-ngu-java-140320051255-phpapp01(1)
878 lap-trinh-mang-voi-ngon-ngu-java-140320051255-phpapp01(1)878 lap-trinh-mang-voi-ngon-ngu-java-140320051255-phpapp01(1)
878 lap-trinh-mang-voi-ngon-ngu-java-140320051255-phpapp01(1)
Anh Quoc
 
Bangkok | Mar-17 | Global Young Academy and Smart Villages Initiative’s engag...
Bangkok | Mar-17 | Global Young Academy and Smart Villages Initiative’s engag...Bangkok | Mar-17 | Global Young Academy and Smart Villages Initiative’s engag...
Bangkok | Mar-17 | Global Young Academy and Smart Villages Initiative’s engag...
Smart Villages
 
Evidencias de agropecuaria
Evidencias de agropecuariaEvidencias de agropecuaria
Evidencias de agropecuaria
vegaheyler
 

Destacado (20)

Tecnologías de prevención de delitos
Tecnologías de prevención de delitosTecnologías de prevención de delitos
Tecnologías de prevención de delitos
 
Epson001
Epson001Epson001
Epson001
 
Bangkok | Mar-17 | THE SMART VILLAGES INITIATIVE
Bangkok | Mar-17 | THE SMART VILLAGES INITIATIVEBangkok | Mar-17 | THE SMART VILLAGES INITIATIVE
Bangkok | Mar-17 | THE SMART VILLAGES INITIATIVE
 
Apostila solidos i 2015 ifrs [everton] pdf
Apostila solidos i 2015 ifrs [everton] pdfApostila solidos i 2015 ifrs [everton] pdf
Apostila solidos i 2015 ifrs [everton] pdf
 
Historia de la ingenieria
Historia de la ingenieriaHistoria de la ingenieria
Historia de la ingenieria
 
Apresentação da DNA Invest
Apresentação da DNA InvestApresentação da DNA Invest
Apresentação da DNA Invest
 
Imahismo
ImahismoImahismo
Imahismo
 
878 lap-trinh-mang-voi-ngon-ngu-java-140320051255-phpapp01(1)
878 lap-trinh-mang-voi-ngon-ngu-java-140320051255-phpapp01(1)878 lap-trinh-mang-voi-ngon-ngu-java-140320051255-phpapp01(1)
878 lap-trinh-mang-voi-ngon-ngu-java-140320051255-phpapp01(1)
 
Fourfold path to effective thinking
Fourfold path to effective thinkingFourfold path to effective thinking
Fourfold path to effective thinking
 
Arlette almanzar formacion y consultoria
Arlette almanzar formacion y consultoriaArlette almanzar formacion y consultoria
Arlette almanzar formacion y consultoria
 
Bangkok | Mar-17 | Medic Mobile, Village Level Healthcare
Bangkok | Mar-17 | Medic Mobile, Village Level Healthcare Bangkok | Mar-17 | Medic Mobile, Village Level Healthcare
Bangkok | Mar-17 | Medic Mobile, Village Level Healthcare
 
T6 la ira
T6 la iraT6 la ira
T6 la ira
 
Bangkok | Mar-17 | Global Young Academy and Smart Villages Initiative’s engag...
Bangkok | Mar-17 | Global Young Academy and Smart Villages Initiative’s engag...Bangkok | Mar-17 | Global Young Academy and Smart Villages Initiative’s engag...
Bangkok | Mar-17 | Global Young Academy and Smart Villages Initiative’s engag...
 
Floating Markets of Thailand
Floating Markets of ThailandFloating Markets of Thailand
Floating Markets of Thailand
 
Simple past
Simple pastSimple past
Simple past
 
Evidencias de agropecuaria
Evidencias de agropecuariaEvidencias de agropecuaria
Evidencias de agropecuaria
 
Amy Akumal
Amy AkumalAmy Akumal
Amy Akumal
 
Balss saišu parēzes
Balss saišu parēzesBalss saišu parēzes
Balss saišu parēzes
 
Contaduria
ContaduriaContaduria
Contaduria
 
Matematika
MatematikaMatematika
Matematika
 

Similar a Tokens in C++

C the basic concepts
C the basic conceptsC the basic concepts
C the basic concepts
Abhinav Vatsa
 
Programming Fundamentals
Programming FundamentalsProgramming Fundamentals
Programming Fundamentals
Hassan293
 

Similar a Tokens in C++ (20)

C the basic concepts
C the basic conceptsC the basic concepts
C the basic concepts
 
C language
C languageC language
C language
 
Programming Fundamentals
Programming FundamentalsProgramming Fundamentals
Programming Fundamentals
 
C
CC
C
 
C introduction
C introductionC introduction
C introduction
 
INTRODUCTION TO C++.pptx
INTRODUCTION TO C++.pptxINTRODUCTION TO C++.pptx
INTRODUCTION TO C++.pptx
 
CSE 1201: Structured Programming Language
CSE 1201: Structured Programming LanguageCSE 1201: Structured Programming Language
CSE 1201: Structured Programming Language
 
C Language presentation
C Language presentationC Language presentation
C Language presentation
 
history of c.ppt
history of c.ppthistory of c.ppt
history of c.ppt
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
 
Funa-C.ppt
Funa-C.pptFuna-C.ppt
Funa-C.ppt
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
 
Basics of C (1).ppt
Basics of C (1).pptBasics of C (1).ppt
Basics of C (1).ppt
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
 
C programming basic pdf.ppt
C programming basic pdf.pptC programming basic pdf.ppt
C programming basic pdf.ppt
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
 
Basics of C--C Basics------------------.ppt
Basics of C--C Basics------------------.pptBasics of C--C Basics------------------.ppt
Basics of C--C Basics------------------.ppt
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
 

Último

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Último (20)

80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 

Tokens in C++