SlideShare a Scribd company logo
1 of 9
C++
By
Abdullah Aal Amin
&
Shantu Chandra Das
What is programming?
Programming is taking
A problem
Find the area of a rectangle
A set of data
length
width
A set of functions
area = length * width
Then,
Applying functions to data to solve the
problem
Why we use C++ language..?
The Advantages:
Maintainability:
modifying code is easier when it entails just a
few text edits, instead of rearranging
hundreds of processor instructions. C++ is
object oriented which further improves
maintainability.
Why we use C++ language..?
• Portability:
different processors make different instructions
available. Programs written as text can be
translated into instructions for many different
processors; one of C++’s strengths is that it
can be used to write programs for nearly any
processor.
I/O operation:
Every program takes some data as input and
generates data as output. It is essential to know
how to provide the input data and how to present
the output results in a desired form or format. C++
supports a rich set of I/O functions to do this.
Line-By-Line Explanation
//
indicates that everything following it until the end of the line is a
comment: it is
ignored by the compiler.
Another way to write a comment is to put it between
/*
and
*/
(e.g. x=1+/*sneakycommenthere*/1;).
A comment of this form may span
multiple lines.
Int main()
{
...
}
defines the code that should execute when the program starts up.
The curly braces represent grouping of multiple commands into a
Block.
cout
<<
This is the syntax for outputting some piece of
text to the screen.
Namespaces:
In C++, identifiers can be defined within a context – sort
of a directory of names – called a namespace. When
we want to access an identifier defined in a
namespace, we tell the compiler to look for it in that
namespace using the scope resolution operator (::).
Using namespace std;
This line tells the compiler that it should look in the std
namespace for any identifier we haven’t defined.

More Related Content

What's hot

difference between c c++ c#
difference between c c++ c#difference between c c++ c#
difference between c c++ c#Sireesh K
 
C and C++ Industrial Training Jalandhar
C and C++ Industrial Training JalandharC and C++ Industrial Training Jalandhar
C and C++ Industrial Training JalandharDreamtech Labs
 
A Crash Course in C Part-1
A Crash Course in C Part-1A Crash Course in C Part-1
A Crash Course in C Part-1MD SAMIR UDDIN
 
C and C ++ Training in Ambala ! BATRA COMPUTER CENTRE
C and C ++ Training in Ambala ! BATRA COMPUTER CENTREC and C ++ Training in Ambala ! BATRA COMPUTER CENTRE
C and C ++ Training in Ambala ! BATRA COMPUTER CENTREjatin batra
 
Basic structure of C++ program
Basic structure of C++ programBasic structure of C++ program
Basic structure of C++ programmatiur rahman
 
Write a C function that returns the length of a string. Function name: strinq...
Write a C function that returns the length of a string. Function name: strinq...Write a C function that returns the length of a string. Function name: strinq...
Write a C function that returns the length of a string. Function name: strinq...hwbloom42
 
Issues in design_of_code_generator
Issues in design_of_code_generatorIssues in design_of_code_generator
Issues in design_of_code_generatorvinithapanneer
 
Functional programming (Let's fall back in love with Programming)
Functional programming (Let's fall back in love with Programming)Functional programming (Let's fall back in love with Programming)
Functional programming (Let's fall back in love with Programming)Sudipta Mukherjee
 
Programming introduction
Programming introductionProgramming introduction
Programming introductionExplore Skilled
 

What's hot (20)

difference between c c++ c#
difference between c c++ c#difference between c c++ c#
difference between c c++ c#
 
C and C++ Industrial Training Jalandhar
C and C++ Industrial Training JalandharC and C++ Industrial Training Jalandhar
C and C++ Industrial Training Jalandhar
 
A Crash Course in C Part-1
A Crash Course in C Part-1A Crash Course in C Part-1
A Crash Course in C Part-1
 
C and C ++ Training in Ambala ! BATRA COMPUTER CENTRE
C and C ++ Training in Ambala ! BATRA COMPUTER CENTREC and C ++ Training in Ambala ! BATRA COMPUTER CENTRE
C and C ++ Training in Ambala ! BATRA COMPUTER CENTRE
 
C vs c++
C vs c++C vs c++
C vs c++
 
C language introduction
C language introduction C language introduction
C language introduction
 
C vs c++
C vs c++C vs c++
C vs c++
 
Basic structure of C++ program
Basic structure of C++ programBasic structure of C++ program
Basic structure of C++ program
 
Fp201 unit2 1
Fp201 unit2 1Fp201 unit2 1
Fp201 unit2 1
 
C programming
C programmingC programming
C programming
 
Write a C function that returns the length of a string. Function name: strinq...
Write a C function that returns the length of a string. Function name: strinq...Write a C function that returns the length of a string. Function name: strinq...
Write a C function that returns the length of a string. Function name: strinq...
 
Differences between c and c++
Differences between c and c++Differences between c and c++
Differences between c and c++
 
Issues in design_of_code_generator
Issues in design_of_code_generatorIssues in design_of_code_generator
Issues in design_of_code_generator
 
C++ ppt
C++ pptC++ ppt
C++ ppt
 
Functional programming (Let's fall back in love with Programming)
Functional programming (Let's fall back in love with Programming)Functional programming (Let's fall back in love with Programming)
Functional programming (Let's fall back in love with Programming)
 
Programming introduction
Programming introductionProgramming introduction
Programming introduction
 
C language
C languageC language
C language
 
Experiment 9(exceptions)
Experiment 9(exceptions)Experiment 9(exceptions)
Experiment 9(exceptions)
 
Lect '1'
Lect '1'Lect '1'
Lect '1'
 
ASSIGNMENT STATEMENTS AND
ASSIGNMENT STATEMENTS ANDASSIGNMENT STATEMENTS AND
ASSIGNMENT STATEMENTS AND
 

Viewers also liked

Africa: In Pursuit of International Environmental and Climate Justice: The Ro...
Africa: In Pursuit of International Environmental and Climate Justice: The Ro...Africa: In Pursuit of International Environmental and Climate Justice: The Ro...
Africa: In Pursuit of International Environmental and Climate Justice: The Ro...Alali Tamuno, Esq., S.J.D.
 
mentoring class iubat
mentoring class iubatmentoring class iubat
mentoring class iubatShant007
 
Licencias compu
Licencias compuLicencias compu
Licencias compucarmitaeas
 
chrispowell.printcomp_digital only
chrispowell.printcomp_digital onlychrispowell.printcomp_digital only
chrispowell.printcomp_digital onlyChristopher Powell
 
Vishnu presentation pdf
Vishnu presentation  pdfVishnu presentation  pdf
Vishnu presentation pdfunnivishnu
 
power point presentaion
power point presentaionpower point presentaion
power point presentaionsimisam1234
 
JOB RELATED COMPETITIVE EXAMINATION CLASSES
JOB RELATED COMPETITIVE  EXAMINATION  CLASSESJOB RELATED COMPETITIVE  EXAMINATION  CLASSES
JOB RELATED COMPETITIVE EXAMINATION CLASSESSOURAV DAS
 
Bio-vision_Kerala quiz 2016
Bio-vision_Kerala quiz 2016Bio-vision_Kerala quiz 2016
Bio-vision_Kerala quiz 2016Subhash Soman
 
Quiz multiple choice questions more than 100 questions latest
Quiz multiple choice questions more than 100 questions latestQuiz multiple choice questions more than 100 questions latest
Quiz multiple choice questions more than 100 questions latestVibhor Agarwal
 

Viewers also liked (13)

Africa: In Pursuit of International Environmental and Climate Justice: The Ro...
Africa: In Pursuit of International Environmental and Climate Justice: The Ro...Africa: In Pursuit of International Environmental and Climate Justice: The Ro...
Africa: In Pursuit of International Environmental and Climate Justice: The Ro...
 
mentoring class iubat
mentoring class iubatmentoring class iubat
mentoring class iubat
 
Diabetic Ear Disease
Diabetic Ear DiseaseDiabetic Ear Disease
Diabetic Ear Disease
 
SUNDER DHAMI
SUNDER DHAMISUNDER DHAMI
SUNDER DHAMI
 
Licencias compu
Licencias compuLicencias compu
Licencias compu
 
Scan004
Scan004Scan004
Scan004
 
chrispowell.printcomp_digital only
chrispowell.printcomp_digital onlychrispowell.printcomp_digital only
chrispowell.printcomp_digital only
 
Vishnu presentation pdf
Vishnu presentation  pdfVishnu presentation  pdf
Vishnu presentation pdf
 
power point presentaion
power point presentaionpower point presentaion
power point presentaion
 
JOB RELATED COMPETITIVE EXAMINATION CLASSES
JOB RELATED COMPETITIVE  EXAMINATION  CLASSESJOB RELATED COMPETITIVE  EXAMINATION  CLASSES
JOB RELATED COMPETITIVE EXAMINATION CLASSES
 
Bio-vision_Kerala quiz 2016
Bio-vision_Kerala quiz 2016Bio-vision_Kerala quiz 2016
Bio-vision_Kerala quiz 2016
 
Beginner's Quiz
Beginner's QuizBeginner's Quiz
Beginner's Quiz
 
Quiz multiple choice questions more than 100 questions latest
Quiz multiple choice questions more than 100 questions latestQuiz multiple choice questions more than 100 questions latest
Quiz multiple choice questions more than 100 questions latest
 

Similar to C++ by shantu

C++ programming language basic to advance level
C++ programming language basic to advance levelC++ programming language basic to advance level
C++ programming language basic to advance levelsajjad ali khan
 
Introduction to C Unit 1
Introduction to C Unit 1Introduction to C Unit 1
Introduction to C Unit 1SURBHI SAROHA
 
Introduction to cpp language and all the required information relating to it
Introduction to cpp language and all the required information relating to itIntroduction to cpp language and all the required information relating to it
Introduction to cpp language and all the required information relating to itPushkarNiroula1
 
Tutorial basic of c ++lesson 1 eng ver
Tutorial basic of c ++lesson 1 eng verTutorial basic of c ++lesson 1 eng ver
Tutorial basic of c ++lesson 1 eng verQrembiezs Intruder
 
67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdf67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdfRajb54
 
The C++ Programming Language
The C++ Programming LanguageThe C++ Programming Language
The C++ Programming LanguageProf Ansari
 
C programming language tutorial for beginers.pdf
C programming language tutorial for beginers.pdfC programming language tutorial for beginers.pdf
C programming language tutorial for beginers.pdfComedyTechnology
 
Introduction To C++ programming and its basic concepts
Introduction To C++ programming and its basic conceptsIntroduction To C++ programming and its basic concepts
Introduction To C++ programming and its basic conceptsssuserf86fba
 
Unit 2 introduction to c programming
Unit 2   introduction to c programmingUnit 2   introduction to c programming
Unit 2 introduction to c programmingMithun DSouza
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptxMugilvannan11
 
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...ANUSUYA S
 

Similar to C++ by shantu (20)

Unit-2.pptx
Unit-2.pptxUnit-2.pptx
Unit-2.pptx
 
C tutorials
C tutorialsC tutorials
C tutorials
 
Prog1-L1.pdf
Prog1-L1.pdfProg1-L1.pdf
Prog1-L1.pdf
 
C++ programming language basic to advance level
C++ programming language basic to advance levelC++ programming language basic to advance level
C++ programming language basic to advance level
 
Introduction to C Unit 1
Introduction to C Unit 1Introduction to C Unit 1
Introduction to C Unit 1
 
Introduction to cpp language and all the required information relating to it
Introduction to cpp language and all the required information relating to itIntroduction to cpp language and all the required information relating to it
Introduction to cpp language and all the required information relating to it
 
Tutorial basic of c ++lesson 1 eng ver
Tutorial basic of c ++lesson 1 eng verTutorial basic of c ++lesson 1 eng ver
Tutorial basic of c ++lesson 1 eng ver
 
67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdf67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdf
 
Bcsl 031 solve assignment
Bcsl 031 solve assignmentBcsl 031 solve assignment
Bcsl 031 solve assignment
 
The C++ Programming Language
The C++ Programming LanguageThe C++ Programming Language
The C++ Programming Language
 
C++ basics
C++ basicsC++ basics
C++ basics
 
C Programming Unit-1
C Programming Unit-1C Programming Unit-1
C Programming Unit-1
 
C programming language tutorial for beginers.pdf
C programming language tutorial for beginers.pdfC programming language tutorial for beginers.pdf
C programming language tutorial for beginers.pdf
 
Introduction To C++ programming and its basic concepts
Introduction To C++ programming and its basic conceptsIntroduction To C++ programming and its basic concepts
Introduction To C++ programming and its basic concepts
 
Presentation c++
Presentation c++Presentation c++
Presentation c++
 
Unit 2 introduction to c programming
Unit 2   introduction to c programmingUnit 2   introduction to c programming
Unit 2 introduction to c programming
 
Introduction Of C++
Introduction Of C++Introduction Of C++
Introduction Of C++
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptx
 
C++ AND CATEGORIES OF SOFTWARE
C++ AND CATEGORIES OF SOFTWAREC++ AND CATEGORIES OF SOFTWARE
C++ AND CATEGORIES OF SOFTWARE
 
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
 

Recently uploaded

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
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
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
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
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
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
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
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
 

Recently uploaded (20)

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
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
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
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
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
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
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
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"
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.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
 

C++ by shantu

  • 2. What is programming? Programming is taking A problem Find the area of a rectangle A set of data length width A set of functions area = length * width Then, Applying functions to data to solve the problem
  • 3. Why we use C++ language..? The Advantages: Maintainability: modifying code is easier when it entails just a few text edits, instead of rearranging hundreds of processor instructions. C++ is object oriented which further improves maintainability.
  • 4. Why we use C++ language..? • Portability: different processors make different instructions available. Programs written as text can be translated into instructions for many different processors; one of C++’s strengths is that it can be used to write programs for nearly any processor.
  • 5. I/O operation: Every program takes some data as input and generates data as output. It is essential to know how to provide the input data and how to present the output results in a desired form or format. C++ supports a rich set of I/O functions to do this.
  • 6. Line-By-Line Explanation // indicates that everything following it until the end of the line is a comment: it is ignored by the compiler. Another way to write a comment is to put it between /* and */ (e.g. x=1+/*sneakycommenthere*/1;). A comment of this form may span multiple lines.
  • 7. Int main() { ... } defines the code that should execute when the program starts up. The curly braces represent grouping of multiple commands into a Block.
  • 8. cout << This is the syntax for outputting some piece of text to the screen.
  • 9. Namespaces: In C++, identifiers can be defined within a context – sort of a directory of names – called a namespace. When we want to access an identifier defined in a namespace, we tell the compiler to look for it in that namespace using the scope resolution operator (::). Using namespace std; This line tells the compiler that it should look in the std namespace for any identifier we haven’t defined.