SlideShare a Scribd company logo
1 of 22
C++ INTRODUCTION AND TOKENS Made by:                                              RAFIYA SIRIN                                                     XI-B
C++ INTRODUCTION C++ was developed by Bjarne Stroustrup of AT&T Bell Laboratories in the early 1980's, and is based on the C language. The name is a pun - "++" is a syntactic construct used in C  and C++ is intended as an incremental improvement of C. Most of C is  subset of C++, so that most C programs can be compiled (i.e. converted into a series of low-level instructions that the computer can execute directly) using a C++ compiler. The name C++ was coined by Rick Mascitti. Ever since it’s birth it has coped up with problems encountered by users, and through discussions at AT&T. however the maturation of the C++ language is attested to by two recent events: (i) the formation of American National Standard Institute) C++ committee  (ii) the publication of The Annotated C++ Reference Manual by Ellis and Stroustrup.
Because C++ retains C as a subset, it gains many of the attractive features of the C language, such as efficiency, closeness to the machine, and a variety of built-in types. A number of new features were added to C++ to make the language even more robust, many of which are not used by novice programmers. By introducing these new features here, we hope that you will begin to use them in your own programs early on and gain their benefits. Some of the features we will look at are the role of constants, inline expansion, references, declaration statements, user defined types, overloading, and the free store.
THE SMALLEST INDIVIDUAL UNIT IN A PROGRAM IS KNOWN AS A TOKEN OR A LEXICAL UNIT TOKENS
KEYWORDS IDENTIFIERS TOKENS LITERALS PUNCTUATORS OPERATORS
KEYWORDS In computer programming, a keyword is a word or identifier that has a particular meaning to the programming language. The meaning of keywords — and, indeed, the meaning of the notion of keyword — differs widely from language to language.   In many languages, such as C and similar environments like C++, a keyword is a reserved word which identifies a syntactic form. Words used in control flow constructs, such as if, then, and else are keywords. In these languages, keywords can also be used as the names of variables or functions.
C++ KEYWORDS
IDENTIFIERS In computer science, Identifiers (IDs) are lexical tokens that name entities. The concept is analogous to that of a "name." Identifiers are used extensively in virtually all information processing systems. Naming entities makes it possible to refer to them, which is essential for any kind of symbolic processing. Computer languages usually place restrictions on what characters may appear in an identifier. For example, in early versions the C and C++ language, identifiers are restricted to being a sequence of one or more ASCII letters, digits (these may not appear as the first character), and underscores. Later versions of these languages, along with many other modern languages support almost all Unicode characters in an identifier (a common restriction is not to permit white space characters and language operators).
RULES FOR DETERMING AN IDENTIFIER First character must be a letter After that any combination of letters and digits can be taken. Only underscore can be included and must be treated as a letter. Keywords cannot be used as identifiers.
SOME VALID AND INVALID IDENTIFIERS VALID:- My file      DATE9_7_77      Z2T0Z9                 MYFILE       _DS                 _HJI3_JK                 _CHK            FILE13 INVALID:- DATA-REC    contains special character                       29CLCT         starting with a digit                       break           reserved keyword                        My.file        contains special character
LITERALS In computer science, a literal is a notation for representing a fixed value in source code. Almost all programming languages have notations for atomic values such as integers, floating-point numbers, strings, and Booleans; some also have notations for elements of enumerated types and compound values such as arrays, records, and objects.  Literals are divided into four types: integer-constant  character- constant Floating constant String-literal
INTEGER CONSTANTS They are whole numbers without any fractional parts. the method of writing integer constants has been specified in following rule:-  an integer constant must have at least one digit and must not contain any decimal point. It may contain either + or – sign. A number with no sign is assumed to be positive. Commas cannot appear in an integer constant. This again has three types: (i)decimal(base 10) (ii)octal(base 8) (iii)hexadecimal(base 16)
CHARACTER CONSTANT A character constant is one character enclosed in single quotes, as in ‘z’. The rule for writing character constant is given below:-       a character constant is C++must contain one character and must be enclosed in single quotation marks. C++ allows us to have certain non-graphic characters. These cannot be typed directly from keyboard. E.g., backspace, tabs, carriage, return etc.
ESCAPE SEQUENCE
FLOATING CONSTANTS Floating constants are also called real constants. Real constants are functions having fractional parts. These may be written in one of the two forms called fractional form or the exponent form. It consists of signed or unsigned digits including a decimal point between digits. The rule for writing a real constant is:- A real constant in fractional form must have at least one digit after the decimal point. It may also have either + or – sign preceding it. A real constant with no sign is assumed to be positive.
STRING LITERALS:- Multiple character constants are treated as string- literals. The rule for writing string-literal is given below:- A string literal is a sequence of characters surrounded by double quotes. Specifically, most string literals can be specified using:   declarative notation;  whitespace delimiters (indentation);  bracketed delimiters (quoting);  escape characters; or  a combination of some or all of the above
PUNCTUATORS A punctuator is a token that has syntactic and semantic meaning to the compiler, but the exact significance depends on the context. A punctuator can also be a token that is used in the syntax of the preprocessor.
OPERATORS Operators are tokens that trigger some computation when applied to variables and other objects in an expression. The following list gives a brief description of the operators and their functions. Unary operators require one operand to operate upon. Binary operators require two operands to operate upon.
ORDER OF PRECEDENCE ( )  [ ]   ! ~ + - ++ -- & *(typeset) * / % + -  << >> < <=  != & ^  I && II ?: =  *= / %=   += -=  &=  ^=  I=  <  <=  >  >=
THANK YOU

More Related Content

What's hot

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
 
Keywords, identifiers ,datatypes in C++
Keywords, identifiers ,datatypes in C++Keywords, identifiers ,datatypes in C++
Keywords, identifiers ,datatypes in C++Ankur Pandey
 
Getting started with c++
Getting started with c++Getting started with c++
Getting started with c++K Durga Prasad
 
Data Type in C Programming
Data Type in C ProgrammingData Type in C Programming
Data Type in C ProgrammingQazi Shahzad Ali
 
Variables in C and C++ Language
Variables in C and C++ LanguageVariables in C and C++ Language
Variables in C and C++ LanguageWay2itech
 
Chapter1 c programming data types, variables and constants
Chapter1 c programming   data types, variables and constantsChapter1 c programming   data types, variables and constants
Chapter1 c programming data types, variables and constantsvinay arora
 
02a fundamental c++ types, arithmetic
02a   fundamental c++ types, arithmetic 02a   fundamental c++ types, arithmetic
02a fundamental c++ types, arithmetic Manzoor ALam
 
C programming | Class 8 | III Term
C programming  | Class 8  | III TermC programming  | Class 8  | III Term
C programming | Class 8 | III TermAndrew Raj
 
C data type format specifier
C data type format specifierC data type format specifier
C data type format specifierSandip Sitäulä
 
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
 
Variables and data types in C++
Variables and data types in C++Variables and data types in C++
Variables and data types in C++Ameer Khan
 
Structure of c_program_to_input_output
Structure of c_program_to_input_outputStructure of c_program_to_input_output
Structure of c_program_to_input_outputAnil Dutt
 
Programming construction tools
Programming construction toolsProgramming construction tools
Programming construction toolssunilchute1
 
Basic Structure Of C++
Basic Structure Of C++Basic Structure Of C++
Basic Structure Of C++DevangiParekh1
 

What's hot (20)

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
 
Keywords, identifiers ,datatypes in C++
Keywords, identifiers ,datatypes in C++Keywords, identifiers ,datatypes in C++
Keywords, identifiers ,datatypes in C++
 
Getting started with c++
Getting started with c++Getting started with c++
Getting started with c++
 
Data Type in C Programming
Data Type in C ProgrammingData Type in C Programming
Data Type in C Programming
 
Variables in C and C++ Language
Variables in C and C++ LanguageVariables in C and C++ Language
Variables in C and C++ Language
 
Chapter1 c programming data types, variables and constants
Chapter1 c programming   data types, variables and constantsChapter1 c programming   data types, variables and constants
Chapter1 c programming data types, variables and constants
 
Data type in c
Data type in cData type in c
Data type in c
 
Data Handling
Data HandlingData Handling
Data Handling
 
02a fundamental c++ types, arithmetic
02a   fundamental c++ types, arithmetic 02a   fundamental c++ types, arithmetic
02a fundamental c++ types, arithmetic
 
C tokens
C tokensC tokens
C tokens
 
C programming | Class 8 | III Term
C programming  | Class 8  | III TermC programming  | Class 8  | III Term
C programming | Class 8 | III Term
 
C data type format specifier
C data type format specifierC data type format specifier
C data type format specifier
 
datatypes and variables in c language
 datatypes and variables in c language datatypes and variables in c language
datatypes and variables in c language
 
Variables and data types in C++
Variables and data types in C++Variables and data types in C++
Variables and data types in C++
 
1 puc programming using c++
1 puc programming using c++1 puc programming using c++
1 puc programming using c++
 
Structure of c_program_to_input_output
Structure of c_program_to_input_outputStructure of c_program_to_input_output
Structure of c_program_to_input_output
 
Programming construction tools
Programming construction toolsProgramming construction tools
Programming construction tools
 
Csharp4 basics
Csharp4 basicsCsharp4 basics
Csharp4 basics
 
Basic Structure Of C++
Basic Structure Of C++Basic Structure Of C++
Basic Structure Of C++
 
C++ Version 2
C++  Version 2C++  Version 2
C++ Version 2
 

Viewers also liked

Basic c++ programs
Basic c++ programsBasic c++ programs
Basic c++ programsharman kaur
 
Biweekly Financial Commentary 09 09 14
Biweekly Financial Commentary 09 09 14Biweekly Financial Commentary 09 09 14
Biweekly Financial Commentary 09 09 14Ant Wong
 
Artificial Intelligence for Internet of Things Insights from Patents
Artificial Intelligence for Internet of Things Insights from PatentsArtificial Intelligence for Internet of Things Insights from Patents
Artificial Intelligence for Internet of Things Insights from PatentsAlex G. Lee, Ph.D. Esq. CLP
 
Ara Social Web 9 09 Small
Ara Social Web 9 09 SmallAra Social Web 9 09 Small
Ara Social Web 9 09 Smallmhines
 
IBM Internet of Things R&D Insights from Patents
IBM Internet of Things R&D Insights from PatentsIBM Internet of Things R&D Insights from Patents
IBM Internet of Things R&D Insights from PatentsAlex G. Lee, Ph.D. Esq. CLP
 
Biweekly Financial Commentary 08 01 28.A
Biweekly Financial Commentary 08 01 28.ABiweekly Financial Commentary 08 01 28.A
Biweekly Financial Commentary 08 01 28.AAnt Wong
 
Biweekly Financial Commentary 09 09 14
Biweekly Financial Commentary 09 09 14Biweekly Financial Commentary 09 09 14
Biweekly Financial Commentary 09 09 14Ant Wong
 
Biweekly Financial Commentary 09 09 14
Biweekly Financial Commentary 09 09 14Biweekly Financial Commentary 09 09 14
Biweekly Financial Commentary 09 09 14Ant Wong
 
Wireless Patents under the PTAB’s IPR & CBM Scrutiny
Wireless Patents under the PTAB’s IPR & CBM ScrutinyWireless Patents under the PTAB’s IPR & CBM Scrutiny
Wireless Patents under the PTAB’s IPR & CBM ScrutinyAlex G. Lee, Ph.D. Esq. CLP
 
Prosvjed Glazbom
Prosvjed GlazbomProsvjed Glazbom
Prosvjed Glazbomgrlica22
 
Cv D Os & Don Ts
Cv D Os & Don TsCv D Os & Don Ts
Cv D Os & Don Tsmmahwish
 
(Microsoft v. Google) Smartphone Patent Wars: Legal & Policy Issues of Standa...
(Microsoft v. Google) Smartphone Patent Wars: Legal & Policy Issues of Standa...(Microsoft v. Google) Smartphone Patent Wars: Legal & Policy Issues of Standa...
(Microsoft v. Google) Smartphone Patent Wars: Legal & Policy Issues of Standa...Alex G. Lee, Ph.D. Esq. CLP
 
Apache CloudStack: API to UI (STLLUG)
Apache CloudStack: API to UI (STLLUG)Apache CloudStack: API to UI (STLLUG)
Apache CloudStack: API to UI (STLLUG)Joe Brockmeier
 

Viewers also liked (20)

Getting Started with C++
Getting Started with C++Getting Started with C++
Getting Started with C++
 
Basic c++ programs
Basic c++ programsBasic c++ programs
Basic c++ programs
 
HMES Sandra Paterna
HMES Sandra PaternaHMES Sandra Paterna
HMES Sandra Paterna
 
Biweekly Financial Commentary 09 09 14
Biweekly Financial Commentary 09 09 14Biweekly Financial Commentary 09 09 14
Biweekly Financial Commentary 09 09 14
 
Artificial Intelligence for Internet of Things Insights from Patents
Artificial Intelligence for Internet of Things Insights from PatentsArtificial Intelligence for Internet of Things Insights from Patents
Artificial Intelligence for Internet of Things Insights from Patents
 
Victor Molev
Victor MolevVictor Molev
Victor Molev
 
Ara Social Web 9 09 Small
Ara Social Web 9 09 SmallAra Social Web 9 09 Small
Ara Social Web 9 09 Small
 
AFS7 Math1
AFS7 Math1AFS7 Math1
AFS7 Math1
 
AFS7 Math 3
AFS7 Math 3AFS7 Math 3
AFS7 Math 3
 
IBM Internet of Things R&D Insights from Patents
IBM Internet of Things R&D Insights from PatentsIBM Internet of Things R&D Insights from Patents
IBM Internet of Things R&D Insights from Patents
 
Biweekly Financial Commentary 08 01 28.A
Biweekly Financial Commentary 08 01 28.ABiweekly Financial Commentary 08 01 28.A
Biweekly Financial Commentary 08 01 28.A
 
Biweekly Financial Commentary 09 09 14
Biweekly Financial Commentary 09 09 14Biweekly Financial Commentary 09 09 14
Biweekly Financial Commentary 09 09 14
 
Biweekly Financial Commentary 09 09 14
Biweekly Financial Commentary 09 09 14Biweekly Financial Commentary 09 09 14
Biweekly Financial Commentary 09 09 14
 
Wireless Patents under the PTAB’s IPR & CBM Scrutiny
Wireless Patents under the PTAB’s IPR & CBM ScrutinyWireless Patents under the PTAB’s IPR & CBM Scrutiny
Wireless Patents under the PTAB’s IPR & CBM Scrutiny
 
Ib.2009
Ib.2009Ib.2009
Ib.2009
 
Prosvjed Glazbom
Prosvjed GlazbomProsvjed Glazbom
Prosvjed Glazbom
 
Cv D Os & Don Ts
Cv D Os & Don TsCv D Os & Don Ts
Cv D Os & Don Ts
 
microsoft
microsoftmicrosoft
microsoft
 
(Microsoft v. Google) Smartphone Patent Wars: Legal & Policy Issues of Standa...
(Microsoft v. Google) Smartphone Patent Wars: Legal & Policy Issues of Standa...(Microsoft v. Google) Smartphone Patent Wars: Legal & Policy Issues of Standa...
(Microsoft v. Google) Smartphone Patent Wars: Legal & Policy Issues of Standa...
 
Apache CloudStack: API to UI (STLLUG)
Apache CloudStack: API to UI (STLLUG)Apache CloudStack: API to UI (STLLUG)
Apache CloudStack: API to UI (STLLUG)
 

Similar to C++ (20)

C-PROGRAM
C-PROGRAMC-PROGRAM
C-PROGRAM
 
Getting started with c++
Getting started with c++Getting started with c++
Getting started with c++
 
C PROGRAMMING LANGUAGE.pptx
 C PROGRAMMING LANGUAGE.pptx C PROGRAMMING LANGUAGE.pptx
C PROGRAMMING LANGUAGE.pptx
 
C programming.pdf
C programming.pdfC programming.pdf
C programming.pdf
 
Presentation of c2
Presentation of c2Presentation of c2
Presentation of c2
 
Introduction to c++
Introduction to c++Introduction to c++
Introduction to c++
 
C presentation book
C presentation bookC presentation book
C presentation book
 
Introduction to C++ (for beginner): C++ Keywords.pptx
Introduction to C++  (for beginner): C++ Keywords.pptxIntroduction to C++  (for beginner): C++ Keywords.pptx
Introduction to C++ (for beginner): C++ Keywords.pptx
 
C programming notes
C programming notesC programming notes
C programming notes
 
INTRODUCTION TO C++.pptx
INTRODUCTION TO C++.pptxINTRODUCTION TO C++.pptx
INTRODUCTION TO C++.pptx
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
C++
C++C++
C++
 
Cnotes
CnotesCnotes
Cnotes
 
C programming notes.pdf
C programming notes.pdfC programming notes.pdf
C programming notes.pdf
 
Basic of the C language
Basic of the C languageBasic of the C language
Basic of the C language
 
C notes
C notesC notes
C notes
 
cunit1.pptx
cunit1.pptxcunit1.pptx
cunit1.pptx
 
434090527-C-Cheat-Sheet. pdf C# program
434090527-C-Cheat-Sheet. pdf  C# program434090527-C-Cheat-Sheet. pdf  C# program
434090527-C-Cheat-Sheet. pdf C# program
 
C introduction
C introductionC introduction
C introduction
 
Lecture 01 2017
Lecture 01 2017Lecture 01 2017
Lecture 01 2017
 

Recently uploaded

BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 

Recently uploaded (20)

Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 

C++

  • 1. C++ INTRODUCTION AND TOKENS Made by: RAFIYA SIRIN XI-B
  • 2. C++ INTRODUCTION C++ was developed by Bjarne Stroustrup of AT&T Bell Laboratories in the early 1980's, and is based on the C language. The name is a pun - "++" is a syntactic construct used in C and C++ is intended as an incremental improvement of C. Most of C is subset of C++, so that most C programs can be compiled (i.e. converted into a series of low-level instructions that the computer can execute directly) using a C++ compiler. The name C++ was coined by Rick Mascitti. Ever since it’s birth it has coped up with problems encountered by users, and through discussions at AT&T. however the maturation of the C++ language is attested to by two recent events: (i) the formation of American National Standard Institute) C++ committee (ii) the publication of The Annotated C++ Reference Manual by Ellis and Stroustrup.
  • 3. Because C++ retains C as a subset, it gains many of the attractive features of the C language, such as efficiency, closeness to the machine, and a variety of built-in types. A number of new features were added to C++ to make the language even more robust, many of which are not used by novice programmers. By introducing these new features here, we hope that you will begin to use them in your own programs early on and gain their benefits. Some of the features we will look at are the role of constants, inline expansion, references, declaration statements, user defined types, overloading, and the free store.
  • 4. THE SMALLEST INDIVIDUAL UNIT IN A PROGRAM IS KNOWN AS A TOKEN OR A LEXICAL UNIT TOKENS
  • 5. KEYWORDS IDENTIFIERS TOKENS LITERALS PUNCTUATORS OPERATORS
  • 6. KEYWORDS In computer programming, a keyword is a word or identifier that has a particular meaning to the programming language. The meaning of keywords — and, indeed, the meaning of the notion of keyword — differs widely from language to language.   In many languages, such as C and similar environments like C++, a keyword is a reserved word which identifies a syntactic form. Words used in control flow constructs, such as if, then, and else are keywords. In these languages, keywords can also be used as the names of variables or functions.
  • 8. IDENTIFIERS In computer science, Identifiers (IDs) are lexical tokens that name entities. The concept is analogous to that of a "name." Identifiers are used extensively in virtually all information processing systems. Naming entities makes it possible to refer to them, which is essential for any kind of symbolic processing. Computer languages usually place restrictions on what characters may appear in an identifier. For example, in early versions the C and C++ language, identifiers are restricted to being a sequence of one or more ASCII letters, digits (these may not appear as the first character), and underscores. Later versions of these languages, along with many other modern languages support almost all Unicode characters in an identifier (a common restriction is not to permit white space characters and language operators).
  • 9. RULES FOR DETERMING AN IDENTIFIER First character must be a letter After that any combination of letters and digits can be taken. Only underscore can be included and must be treated as a letter. Keywords cannot be used as identifiers.
  • 10. SOME VALID AND INVALID IDENTIFIERS VALID:- My file DATE9_7_77 Z2T0Z9 MYFILE _DS _HJI3_JK _CHK FILE13 INVALID:- DATA-REC contains special character 29CLCT starting with a digit break reserved keyword My.file contains special character
  • 11. LITERALS In computer science, a literal is a notation for representing a fixed value in source code. Almost all programming languages have notations for atomic values such as integers, floating-point numbers, strings, and Booleans; some also have notations for elements of enumerated types and compound values such as arrays, records, and objects. Literals are divided into four types: integer-constant character- constant Floating constant String-literal
  • 12. INTEGER CONSTANTS They are whole numbers without any fractional parts. the method of writing integer constants has been specified in following rule:- an integer constant must have at least one digit and must not contain any decimal point. It may contain either + or – sign. A number with no sign is assumed to be positive. Commas cannot appear in an integer constant. This again has three types: (i)decimal(base 10) (ii)octal(base 8) (iii)hexadecimal(base 16)
  • 13. CHARACTER CONSTANT A character constant is one character enclosed in single quotes, as in ‘z’. The rule for writing character constant is given below:- a character constant is C++must contain one character and must be enclosed in single quotation marks. C++ allows us to have certain non-graphic characters. These cannot be typed directly from keyboard. E.g., backspace, tabs, carriage, return etc.
  • 15. FLOATING CONSTANTS Floating constants are also called real constants. Real constants are functions having fractional parts. These may be written in one of the two forms called fractional form or the exponent form. It consists of signed or unsigned digits including a decimal point between digits. The rule for writing a real constant is:- A real constant in fractional form must have at least one digit after the decimal point. It may also have either + or – sign preceding it. A real constant with no sign is assumed to be positive.
  • 16. STRING LITERALS:- Multiple character constants are treated as string- literals. The rule for writing string-literal is given below:- A string literal is a sequence of characters surrounded by double quotes. Specifically, most string literals can be specified using:   declarative notation; whitespace delimiters (indentation); bracketed delimiters (quoting); escape characters; or a combination of some or all of the above
  • 17. PUNCTUATORS A punctuator is a token that has syntactic and semantic meaning to the compiler, but the exact significance depends on the context. A punctuator can also be a token that is used in the syntax of the preprocessor.
  • 18.
  • 19. OPERATORS Operators are tokens that trigger some computation when applied to variables and other objects in an expression. The following list gives a brief description of the operators and their functions. Unary operators require one operand to operate upon. Binary operators require two operands to operate upon.
  • 20.
  • 21. ORDER OF PRECEDENCE ( ) [ ] ! ~ + - ++ -- & *(typeset) * / % + - << >> < <= != & ^ I && II ?: = *= / %= += -= &= ^= I= < <= > >=