SlideShare a Scribd company logo
1 of 20
C++ Language 
By:-AAKASH KAUSHIK 
#9289817971, 98919893083 
Email-theaakashkumar@gmail.com 
AAKASH KAUSHIK 
9891983083,9289817971
UNIT -1 
INTRODUCTION TO 
C++ 
AAKASH KAUSHIK 
9891983083,9289817971
INTRODUCTION 
C++ IS A PROGRAMMING LANGUAGE 
DEVELOPED BY BJARNE STROUSTRUP 
IN EARLY 1980’S 
AT AT&T BELL LABORATORIES, USA. 
AAKASH KAUSHIK 
9891983083,9289817971
LANGUAGE 
Language is way to communicate with each 
other 
AAKASH KAUSHIK 
9891983083,9289817971
PROGRAM 
A PROGRAM IS A SET/SEQUENCE OF 
COMMANDS 
AAKASH KAUSHIK 
9891983083,9289817971
COMPUTER LANGUAGE AND MACHINE 
LANGUAGE 
BINARY LANGUAGE/MACHINE LANGUAGE/LOW 
LEVEL LANGUAGE 
Computer is an electronic device at its core level 
it works on Binary Language i.e., 0,1 or high & 
low. Everything in computer is stored in LLL. 
HIGH LEVEL LANGUAGE 
Programming languages like JAVA,C,C++ are 
called HLL. Code of all these language are 
written in English language. 
AAKASH KAUSHIK 
9891983083,9289817971
LANGUAGE PROCESSORS 
ASSEMBLOR- Converts Assembly language into 
machine language 
INTERPRETER-Converts HLL to LLL and vice 
versa. It performs conversion in line by line 
manner and notifies if any error is detected & 
stops it’s conversion until that error is rectified 
COMPILER-Converts HLL to LLL and vice versa. 
It converts the whole program in one go and 
notifies all the errors at the same time 
AAKASH KAUSHIK 
9891983083,9289817971
C++ CHARACTER SET 
Character sets are the characters used to write a 
language. 
Characters A-Z, a-z. 
Digits 0-9. 
Special Symbols {} [] () ; : “ ‘ < > ? & # ~ |  / etc. 
White spaces, new line characters . 
Besides all these C++ has 256 ASCII characters. 
ASCII- American Standard Code for Information 
Interchange AAKASH KAUSHIK 
9891983083,9289817971
TOKENS/LEXICAL UNITS 
When the compiler is processing the source code of 
a program, each group of characters separated by 
white spaces is called a token. 
AAKASH KAUSHIK 
9891983083,9289817971
C++ Allows 5 Types Of 
Tokens 
1. KEYWORDS 
2. IDENTIFIERS 
3. LITERALS/CONSTANTS 
4. PUNTUATORS/SEPARATORS 
5. OPERATORS 
AAKASH KAUSHIK 
9891983083,9289817971
KEYWORDS 
KEYWORDS ( also known as specially reserved 
words) CONVEYS A SPECIAL MEANING TO 
COMPILER. 
KEYWORDS are always typed in short(lower) 
case. 
They are reserved by the language for special 
purpose and can’t be redefined as an 
IDENTIFIER. 
AAKASH KAUSHIK 
9891983083,9289817971
LIST OF KEYWORDS 
AAKASH KAUSHIK 
9891983083,9289817971
IDENTIFIERS 
IDENTIFIERS ARE THE NAMES GIVEN BY 
THE PROGRAMMER TO DIFFERENT BLOCKS, 
PARTS OF A PROGRAM TO IDENTIFY THEM. 
AAKASH KAUSHIK 
9891983083,9289817971
RULES/CONVENTIONS FOR 
DEFINING IDENTIFIERS 
It can contain characters(A-Z, a-z),Digits(0- 
9), & only one special symbol called 
underscore(_). 
First letter must be a character (A-Z, a-z) or 
underscore(_). 
No commas or blank spaces allowed. 
C++ IS A CASE SENSITIVE LANGUAGE i.e., 
Upper case and Lower case characters are 
different. 
AAKASH KAUSHIK 
9891983083,9289817971
LITERALS/CONSTANTS 
LITERALS AND CONSTANTS ARE THOSE 
TOKENS WHOSE VALUES DON’T CHANGE 
DURING THE PROGRAM EXECUTION. 
AAKASH KAUSHIK 
9891983083,9289817971
LITERALS/CONSTANTS 
INTEGER CONSTANT 
complete rounded off numbers are called integer constants for ex :- 
540, 2, 98 etc. 
REAL/FLOAT CONSTANTS 
Numbers with decimal point are called Real/Float literals for ex :- 
2.5, 0.54, 45.98 etc. 
CHARACTER CONSTANTS 
Single character enclosed within single quotes(‘ ’) are called 
character constants for ex :- ‘A’, ‘B’, ‘d’ etc. 
STRING CONSTANTS 
Group of characters enclosed within double quotes(“ “) are called 
string literals for ex :- “programming” “language” etc. 
AAKASH KAUSHIK 
9891983083,9289817971
PUNTUATORS/SEPARATORS 
PUNTUATORS ARE USED TO SEPARATE TOKENS 
WITHIN A PROGRAM. THE VARIOUS 
PUNUATORS ARE: 
{} [] () : ; , etc. 
AAKASH KAUSHIK 
9891983083,9289817971
OPERATORS 
OPERATORS OPERATES ON SOME DATA TO 
GIVE RESULTS 
For ex :- A+B=C 
Here A, B are operand and + is the operator 
which produces C as a result of addition of A 
and B. 
AAKASH KAUSHIK 
9891983083,9289817971
OPERATORS 
Various operators in C++ are 
Arithmetic operators 
+,-,*,/,% 
Relational operators 
Logical operators 
Increment/Decrement Operators 
Conditional Operators 
We will discuss operators in depth later in Unit-4 
Operators & expressions. 
AAKASH KAUSHIK 
9891983083,9289817971
THANK 
YOU 
AAKASH KAUSHIK 
9891983083,9289817971

More Related Content

What's hot

Presentation mcrl2
Presentation mcrl2Presentation mcrl2
Presentation mcrl2
matifch
 
Global variables, sorting static variables,function and arrays,
Global variables, sorting static variables,function and arrays,Global variables, sorting static variables,function and arrays,
Global variables, sorting static variables,function and arrays,
Ahmad55ali
 
8.1 alogorithm & prolem solving
8.1 alogorithm & prolem solving8.1 alogorithm & prolem solving
8.1 alogorithm & prolem solving
Khan Yousafzai
 

What's hot (20)

Code optimization
Code optimization Code optimization
Code optimization
 
Functions in C++
Functions in C++Functions in C++
Functions in C++
 
C structure
C structureC structure
C structure
 
Introduction to code optimization by dipankar
Introduction to code optimization by dipankarIntroduction to code optimization by dipankar
Introduction to code optimization by dipankar
 
Functionincprogram
FunctionincprogramFunctionincprogram
Functionincprogram
 
Algorithm and c language
Algorithm and c languageAlgorithm and c language
Algorithm and c language
 
Code optimization
Code optimizationCode optimization
Code optimization
 
Presentation on Function in C Programming
Presentation on Function in C ProgrammingPresentation on Function in C Programming
Presentation on Function in C Programming
 
Functions in C++ (OOP)
Functions in C++ (OOP)Functions in C++ (OOP)
Functions in C++ (OOP)
 
Fda unit 1 lec 1
Fda unit 1 lec  1Fda unit 1 lec  1
Fda unit 1 lec 1
 
FUNCTIONS IN c++ PPT
FUNCTIONS IN c++ PPTFUNCTIONS IN c++ PPT
FUNCTIONS IN c++ PPT
 
Optimization
OptimizationOptimization
Optimization
 
Presentation mcrl2
Presentation mcrl2Presentation mcrl2
Presentation mcrl2
 
Programming in c (importance of c)
Programming in c (importance of c)Programming in c (importance of c)
Programming in c (importance of c)
 
Global variables, sorting static variables,function and arrays,
Global variables, sorting static variables,function and arrays,Global variables, sorting static variables,function and arrays,
Global variables, sorting static variables,function and arrays,
 
Function & Recursion in C
Function & Recursion in CFunction & Recursion in C
Function & Recursion in C
 
Structure of c
Structure of cStructure of c
Structure of c
 
8.1 alogorithm & prolem solving
8.1 alogorithm & prolem solving8.1 alogorithm & prolem solving
8.1 alogorithm & prolem solving
 
MCRL2
MCRL2MCRL2
MCRL2
 
Functions in c
Functions in cFunctions in c
Functions in c
 

Viewers also liked

12-Formation of the subjunctive
12-Formation of the subjunctive12-Formation of the subjunctive
12-Formation of the subjunctive
ck65
 

Viewers also liked (20)

C++ ppt
C++ pptC++ ppt
C++ ppt
 
Intro to C++ - language
Intro to C++ - languageIntro to C++ - language
Intro to C++ - language
 
Basics of c++ Programming Language
Basics of c++ Programming LanguageBasics of c++ Programming Language
Basics of c++ Programming Language
 
Presentation on C++ Programming Language
Presentation on C++ Programming LanguagePresentation on C++ Programming Language
Presentation on C++ Programming Language
 
C++ language
C++ languageC++ language
C++ language
 
C++ programming
C++ programmingC++ programming
C++ programming
 
C++ ppt
C++ pptC++ ppt
C++ ppt
 
12-Formation of the subjunctive
12-Formation of the subjunctive12-Formation of the subjunctive
12-Formation of the subjunctive
 
C++ Programming Club-Lecture 1
C++ Programming Club-Lecture 1C++ Programming Club-Lecture 1
C++ Programming Club-Lecture 1
 
Apa style-1 (1)
Apa style-1 (1)Apa style-1 (1)
Apa style-1 (1)
 
General Tips to Overcome an Interview
General Tips to Overcome an InterviewGeneral Tips to Overcome an Interview
General Tips to Overcome an Interview
 
Programming Fundamental Presentation
Programming Fundamental PresentationProgramming Fundamental Presentation
Programming Fundamental Presentation
 
Datatype in c++ unit 3 -topic 2
Datatype in c++ unit 3 -topic 2Datatype in c++ unit 3 -topic 2
Datatype in c++ unit 3 -topic 2
 
Calculus II - 15
Calculus II - 15Calculus II - 15
Calculus II - 15
 
Computer Programming in C++
Computer Programming in C++ Computer Programming in C++
Computer Programming in C++
 
High Level Programming Constructs
High Level Programming ConstructsHigh Level Programming Constructs
High Level Programming Constructs
 
C data_structures
C  data_structuresC  data_structures
C data_structures
 
Variables in C and C++ Language
Variables in C and C++ LanguageVariables in C and C++ Language
Variables in C and C++ Language
 
Inheritance question class 12th
Inheritance question class 12thInheritance question class 12th
Inheritance question class 12th
 
Ms word Part 1
Ms  word Part 1Ms  word Part 1
Ms word Part 1
 

Similar to c++ programming Unit 1 introduction to c++

Basic of the C language
Basic of the C languageBasic of the C language
Basic of the C language
Sachin Verma
 
Introduction of c_language
Introduction of c_languageIntroduction of c_language
Introduction of c_language
SINGH PROJECTS
 
c programming Pankaj Panjwani.pptx
c programming Pankaj Panjwani.pptxc programming Pankaj Panjwani.pptx
c programming Pankaj Panjwani.pptx
hario13
 

Similar to c++ programming Unit 1 introduction to c++ (20)

c++ programming Unit 2 basic structure of a c++ program
c++ programming Unit 2 basic structure of a c++ programc++ programming Unit 2 basic structure of a c++ program
c++ programming Unit 2 basic structure of a c++ program
 
C++
C++C++
C++
 
Building blocks 2
Building blocks 2Building blocks 2
Building blocks 2
 
Lecture 01 2017
Lecture 01 2017Lecture 01 2017
Lecture 01 2017
 
C PADHLO FRANDS.pdf
C PADHLO FRANDS.pdfC PADHLO FRANDS.pdf
C PADHLO FRANDS.pdf
 
Pascal programming lecture notes
Pascal programming lecture notesPascal programming lecture notes
Pascal programming lecture notes
 
Wk1to4
Wk1to4Wk1to4
Wk1to4
 
Presentation of c2
Presentation of c2Presentation of c2
Presentation of c2
 
Msc prev completed
Msc prev completedMsc prev completed
Msc prev completed
 
Msc prev updated
Msc prev updatedMsc prev updated
Msc prev updated
 
012. SQL.pdf
012. SQL.pdf012. SQL.pdf
012. SQL.pdf
 
C PROGRAMMING LANGUAGE.pptx
 C PROGRAMMING LANGUAGE.pptx C PROGRAMMING LANGUAGE.pptx
C PROGRAMMING LANGUAGE.pptx
 
C Programming
C ProgrammingC Programming
C Programming
 
Qbasic Tutorial
Qbasic TutorialQbasic Tutorial
Qbasic Tutorial
 
Basic of the C language
Basic of the C languageBasic of the C language
Basic of the C language
 
Cnotes
CnotesCnotes
Cnotes
 
Introduction of c_language
Introduction of c_languageIntroduction of c_language
Introduction of c_language
 
Chapter1.pptx
Chapter1.pptxChapter1.pptx
Chapter1.pptx
 
c programming Pankaj Panjwani.pptx
c programming Pankaj Panjwani.pptxc programming Pankaj Panjwani.pptx
c programming Pankaj Panjwani.pptx
 
c++ programming Unit 3 variables,data types
c++ programming Unit 3 variables,data typesc++ programming Unit 3 variables,data types
c++ programming Unit 3 variables,data types
 

More from AAKASH KUMAR

2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
AAKASH KUMAR
 
2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
AAKASH KUMAR
 

More from AAKASH KUMAR (20)

NETWORKING AND COMMUNICATION || SLIDE 1 || TOPOLOGY AND PLACEMENT OF DEVICES|...
NETWORKING AND COMMUNICATION || SLIDE 1 || TOPOLOGY AND PLACEMENT OF DEVICES|...NETWORKING AND COMMUNICATION || SLIDE 1 || TOPOLOGY AND PLACEMENT OF DEVICES|...
NETWORKING AND COMMUNICATION || SLIDE 1 || TOPOLOGY AND PLACEMENT OF DEVICES|...
 
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 2) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
 
Inheritance question
Inheritance questionInheritance question
Inheritance question
 
Header file BASED QUESTION- CBSE CS CLASS 12TH
Header file BASED QUESTION- CBSE CS CLASS 12THHeader file BASED QUESTION- CBSE CS CLASS 12TH
Header file BASED QUESTION- CBSE CS CLASS 12TH
 
Constructor & destructor based question- cbse cs class 12th
Constructor & destructor based question-  cbse cs class 12thConstructor & destructor based question-  cbse cs class 12th
Constructor & destructor based question- cbse cs class 12th
 
CHOOSE THE CORRECT IDENTIFIER - Q.1 CBSE CS EXAM
CHOOSE THE CORRECT IDENTIFIER - Q.1 CBSE CS EXAMCHOOSE THE CORRECT IDENTIFIER - Q.1 CBSE CS EXAM
CHOOSE THE CORRECT IDENTIFIER - Q.1 CBSE CS EXAM
 
Practical exam special- CBSE CS CLASS 12th
Practical exam special- CBSE CS CLASS 12thPractical exam special- CBSE CS CLASS 12th
Practical exam special- CBSE CS CLASS 12th
 
2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
2 d array(part 1) || 2D ARRAY FUNCTION WRITING || GET 100% MARKS IN CBSE CS
 
STACK || FUNCTION WRITING BASED ON STACK || DATA STRUCTURE || LINKED LIST || ...
STACK || FUNCTION WRITING BASED ON STACK || DATA STRUCTURE || LINKED LIST || ...STACK || FUNCTION WRITING BASED ON STACK || DATA STRUCTURE || LINKED LIST || ...
STACK || FUNCTION WRITING BASED ON STACK || DATA STRUCTURE || LINKED LIST || ...
 
QUEUE || FUNCTION WRITING BASED ON QUEUE || LINKED LIST || DATA STRUCTURE || ...
QUEUE || FUNCTION WRITING BASED ON QUEUE || LINKED LIST || DATA STRUCTURE || ...QUEUE || FUNCTION WRITING BASED ON QUEUE || LINKED LIST || DATA STRUCTURE || ...
QUEUE || FUNCTION WRITING BASED ON QUEUE || LINKED LIST || DATA STRUCTURE || ...
 
Ms word Part 2
Ms  word Part 2Ms  word Part 2
Ms word Part 2
 
Power point2007instruction
Power point2007instructionPower point2007instruction
Power point2007instruction
 
Html introduction Part-2
Html introduction Part-2Html introduction Part-2
Html introduction Part-2
 
Html Slide Part-1
Html Slide Part-1Html Slide Part-1
Html Slide Part-1
 
Evolution / history of Computer
Evolution / history of ComputerEvolution / history of Computer
Evolution / history of Computer
 
computer system
computer system computer system
computer system
 
Array within a class
Array within a classArray within a class
Array within a class
 
Input Output Devices and Memory Unit
Input Output Devices and Memory UnitInput Output Devices and Memory Unit
Input Output Devices and Memory Unit
 
C++ programming Unit 5 flow of control
C++ programming Unit 5 flow of controlC++ programming Unit 5 flow of control
C++ programming Unit 5 flow of control
 
c++ programming Unit 4 operators
c++ programming Unit 4 operatorsc++ programming Unit 4 operators
c++ programming Unit 4 operators
 

Recently uploaded

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
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.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)
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
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
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
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
 
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
 
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
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.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...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
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
 
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
 
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
 

c++ programming Unit 1 introduction to c++

  • 1. C++ Language By:-AAKASH KAUSHIK #9289817971, 98919893083 Email-theaakashkumar@gmail.com AAKASH KAUSHIK 9891983083,9289817971
  • 2. UNIT -1 INTRODUCTION TO C++ AAKASH KAUSHIK 9891983083,9289817971
  • 3. INTRODUCTION C++ IS A PROGRAMMING LANGUAGE DEVELOPED BY BJARNE STROUSTRUP IN EARLY 1980’S AT AT&T BELL LABORATORIES, USA. AAKASH KAUSHIK 9891983083,9289817971
  • 4. LANGUAGE Language is way to communicate with each other AAKASH KAUSHIK 9891983083,9289817971
  • 5. PROGRAM A PROGRAM IS A SET/SEQUENCE OF COMMANDS AAKASH KAUSHIK 9891983083,9289817971
  • 6. COMPUTER LANGUAGE AND MACHINE LANGUAGE BINARY LANGUAGE/MACHINE LANGUAGE/LOW LEVEL LANGUAGE Computer is an electronic device at its core level it works on Binary Language i.e., 0,1 or high & low. Everything in computer is stored in LLL. HIGH LEVEL LANGUAGE Programming languages like JAVA,C,C++ are called HLL. Code of all these language are written in English language. AAKASH KAUSHIK 9891983083,9289817971
  • 7. LANGUAGE PROCESSORS ASSEMBLOR- Converts Assembly language into machine language INTERPRETER-Converts HLL to LLL and vice versa. It performs conversion in line by line manner and notifies if any error is detected & stops it’s conversion until that error is rectified COMPILER-Converts HLL to LLL and vice versa. It converts the whole program in one go and notifies all the errors at the same time AAKASH KAUSHIK 9891983083,9289817971
  • 8. C++ CHARACTER SET Character sets are the characters used to write a language. Characters A-Z, a-z. Digits 0-9. Special Symbols {} [] () ; : “ ‘ < > ? & # ~ | / etc. White spaces, new line characters . Besides all these C++ has 256 ASCII characters. ASCII- American Standard Code for Information Interchange AAKASH KAUSHIK 9891983083,9289817971
  • 9. TOKENS/LEXICAL UNITS When the compiler is processing the source code of a program, each group of characters separated by white spaces is called a token. AAKASH KAUSHIK 9891983083,9289817971
  • 10. C++ Allows 5 Types Of Tokens 1. KEYWORDS 2. IDENTIFIERS 3. LITERALS/CONSTANTS 4. PUNTUATORS/SEPARATORS 5. OPERATORS AAKASH KAUSHIK 9891983083,9289817971
  • 11. KEYWORDS KEYWORDS ( also known as specially reserved words) CONVEYS A SPECIAL MEANING TO COMPILER. KEYWORDS are always typed in short(lower) case. They are reserved by the language for special purpose and can’t be redefined as an IDENTIFIER. AAKASH KAUSHIK 9891983083,9289817971
  • 12. LIST OF KEYWORDS AAKASH KAUSHIK 9891983083,9289817971
  • 13. IDENTIFIERS IDENTIFIERS ARE THE NAMES GIVEN BY THE PROGRAMMER TO DIFFERENT BLOCKS, PARTS OF A PROGRAM TO IDENTIFY THEM. AAKASH KAUSHIK 9891983083,9289817971
  • 14. RULES/CONVENTIONS FOR DEFINING IDENTIFIERS It can contain characters(A-Z, a-z),Digits(0- 9), & only one special symbol called underscore(_). First letter must be a character (A-Z, a-z) or underscore(_). No commas or blank spaces allowed. C++ IS A CASE SENSITIVE LANGUAGE i.e., Upper case and Lower case characters are different. AAKASH KAUSHIK 9891983083,9289817971
  • 15. LITERALS/CONSTANTS LITERALS AND CONSTANTS ARE THOSE TOKENS WHOSE VALUES DON’T CHANGE DURING THE PROGRAM EXECUTION. AAKASH KAUSHIK 9891983083,9289817971
  • 16. LITERALS/CONSTANTS INTEGER CONSTANT complete rounded off numbers are called integer constants for ex :- 540, 2, 98 etc. REAL/FLOAT CONSTANTS Numbers with decimal point are called Real/Float literals for ex :- 2.5, 0.54, 45.98 etc. CHARACTER CONSTANTS Single character enclosed within single quotes(‘ ’) are called character constants for ex :- ‘A’, ‘B’, ‘d’ etc. STRING CONSTANTS Group of characters enclosed within double quotes(“ “) are called string literals for ex :- “programming” “language” etc. AAKASH KAUSHIK 9891983083,9289817971
  • 17. PUNTUATORS/SEPARATORS PUNTUATORS ARE USED TO SEPARATE TOKENS WITHIN A PROGRAM. THE VARIOUS PUNUATORS ARE: {} [] () : ; , etc. AAKASH KAUSHIK 9891983083,9289817971
  • 18. OPERATORS OPERATORS OPERATES ON SOME DATA TO GIVE RESULTS For ex :- A+B=C Here A, B are operand and + is the operator which produces C as a result of addition of A and B. AAKASH KAUSHIK 9891983083,9289817971
  • 19. OPERATORS Various operators in C++ are Arithmetic operators +,-,*,/,% Relational operators Logical operators Increment/Decrement Operators Conditional Operators We will discuss operators in depth later in Unit-4 Operators & expressions. AAKASH KAUSHIK 9891983083,9289817971
  • 20. THANK YOU AAKASH KAUSHIK 9891983083,9289817971