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

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
vinay arora
 
C programming | Class 8 | III Term
C programming  | Class 8  | III TermC programming  | Class 8  | III Term
C programming | Class 8 | III Term
Andrew Raj
 
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
Anil Dutt
 

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

Biweekly Financial Commentary 09 09 14
Biweekly Financial Commentary 09 09 14Biweekly Financial Commentary 09 09 14
Biweekly Financial Commentary 09 09 14
Ant Wong
 
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
Ant Wong
 
Biweekly Financial Commentary 09 09 14
Biweekly Financial Commentary 09 09 14Biweekly Financial Commentary 09 09 14
Biweekly Financial Commentary 09 09 14
Ant Wong
 
Biweekly Financial Commentary 09 09 14
Biweekly Financial Commentary 09 09 14Biweekly Financial Commentary 09 09 14
Biweekly Financial Commentary 09 09 14
Ant Wong
 
Prosvjed Glazbom
Prosvjed GlazbomProsvjed Glazbom
Prosvjed Glazbom
grlica22
 
Cv D Os & Don Ts
Cv D Os & Don TsCv D Os & Don Ts
Cv D Os & Don Ts
mmahwish
 

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++

Basic of the C language
Basic of the C languageBasic of the C language
Basic of the C language
Sachin Verma
 
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
MAHESHV559910
 

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

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Recently uploaded (20)

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
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...
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
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
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 

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= < <= > >=