SlideShare a Scribd company logo
Introduction to C++
C is a programming language developed in the 1970's alongside
the UNIX operating system.
C provides a comprehensive set of features for handling a wide
variety of applications, such as systems development and scientific
computation.
C++ is an “extension” of the C language, in that most C programs
are also C++ programs.
C++, as opposed to C, supports “object-oriented programming.”
General form of a C++ program :
// Program description
#include directives
int main()
{
constant declarations
variable declarations
executable statements
return 0;
}
C++ keywords
Keywords appear in blue in Visual C++.
Each keyword has a predefined purpose in the language.
Do not use keywords as variable and constant names!!
The complete list of keywords is on page 673 of the textbook.
We shall cover the following keywords in this class:
bool, break, case, char, const, continue,
do, default, double, else, extern, false,
float, for, if, int, long, namespace, return,
short, static, struct, switch, typedef, true,
unsigned, void, while
Example 0 – adding 2 numbers
Peter: Hey Frank, I just learned how to add two numbers
together.
Frank: Cool!
Peter : Give me the first number.
Frank: 2.
Peter : Ok, and give me the second number.
Frank: 5.
Peter : Ok, here's the answer: 2 + 5 = 7.
Frank: Wow! You are amazing!
after Frank says “2”, Peter has to keep this number in his mind.
after Frank says “5”, Peter also needs to keep this number in his mind.
First number : 2 second number : 5 Sum : 7
C++ comments
Comments appear in green in Visual C++.
Comments are explanatory notes; they are ignored by the
compiler.
There are two ways to include comments in a program:
// A double slash marks the start of a
//single line comment.
/* A slash followed by an asterisk
marks the start of a multiple line
comment. It ends with an asterisk
followed by a slash. */
C++ compiler directives
Compiler directives appear in blue in Visual C++.
The #include directive tells the compiler to include some already
existing C++ code in your program.
The included file is then linked with the program.
There are two forms of #include statements:
#include <iostream> //for pre-defined files
#include "my_lib.h" //for user-defined
files
Programming Style (cont. )
In order to improve the readability of your program, use the
following conventions:
Start the program with a header that tells what the program
does.
Use meaningful variable names.
Document each variable declaration with a comment telling
what the variable is used for.
Place each executable statement on a single line.
A segment of code is a sequence of executable statements that
belong together.
Use blank lines to separate different segments of code.
Document each segment of code with a comment telling
what the segment does.
For more details
www.asit.amcsquare.com
Wise Machines India Pvt Ltd
# 360, Sri Sai Padma Arcade,
Varthur Main Road,
Ramagondanahalli,
Whitefield ,Bangalore – 560066
9740377262
* we also have branches in Hyderabad and Chennai
we provide online and classroom training for C++

More Related Content

What's hot

1 introduction to c programming language
1 introduction to c programming language1 introduction to c programming language
1 introduction to c programming language
Narendra Soni
 
C and objective-C
 C  and  objective-C C  and  objective-C
C and objective-C
Vikas Pandey
 
Intro to cprogramming
Intro to cprogrammingIntro to cprogramming
Intro to cprogramming
skashwin98
 
C# Introduction brief
C# Introduction briefC# Introduction brief
C# Introduction brief
Prasanna Kumar SM
 
History of c#
History of c#History of c#
History of c#
Sadia Munawar
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
RamaBoya2
 
C programming introduction
C programming introductionC programming introduction
C programming introduction
Ducat
 
Introduction to Computer and Programing - Lab2
Introduction to Computer and Programing - Lab2Introduction to Computer and Programing - Lab2
Introduction to Computer and Programing - Lab2hassaanciit
 
Comments in C Programming
Comments in C ProgrammingComments in C Programming
Comments in C Programming
programming9
 
Input output in c
Input output in cInput output in c
Input output in c
Ducat
 
Introduction to c_language
Introduction to c_languageIntroduction to c_language
Introduction to c_language
Way2itech
 
The different kind of programming language
The  different kind of programming languageThe  different kind of programming language
The different kind of programming language
Md Amran
 
Unit 1 of c++ part 1 basic introduction
Unit 1 of c++ part 1 basic introductionUnit 1 of c++ part 1 basic introduction
Unit 1 of c++ part 1 basic introduction
AKR Education
 
Introduction to C Language
Introduction to C LanguageIntroduction to C Language
Introduction to C Language
Tarun Sharma
 

What's hot (20)

1 introduction to c programming language
1 introduction to c programming language1 introduction to c programming language
1 introduction to c programming language
 
C and objective-C
 C  and  objective-C C  and  objective-C
C and objective-C
 
C#
C#C#
C#
 
Intro to cprogramming
Intro to cprogrammingIntro to cprogramming
Intro to cprogramming
 
OVERVIEW OF ‘C’ PROGRAM
OVERVIEW OF ‘C’ PROGRAMOVERVIEW OF ‘C’ PROGRAM
OVERVIEW OF ‘C’ PROGRAM
 
Lect '1'
Lect '1'Lect '1'
Lect '1'
 
C# Introduction brief
C# Introduction briefC# Introduction brief
C# Introduction brief
 
History of c#
History of c#History of c#
History of c#
 
Presentation1
Presentation1Presentation1
Presentation1
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
 
C sharp chap1
C sharp chap1C sharp chap1
C sharp chap1
 
C programming introduction
C programming introductionC programming introduction
C programming introduction
 
Introduction to Computer and Programing - Lab2
Introduction to Computer and Programing - Lab2Introduction to Computer and Programing - Lab2
Introduction to Computer and Programing - Lab2
 
Comments in C Programming
Comments in C ProgrammingComments in C Programming
Comments in C Programming
 
Input output in c
Input output in cInput output in c
Input output in c
 
Glossary
GlossaryGlossary
Glossary
 
Introduction to c_language
Introduction to c_languageIntroduction to c_language
Introduction to c_language
 
The different kind of programming language
The  different kind of programming languageThe  different kind of programming language
The different kind of programming language
 
Unit 1 of c++ part 1 basic introduction
Unit 1 of c++ part 1 basic introductionUnit 1 of c++ part 1 basic introduction
Unit 1 of c++ part 1 basic introduction
 
Introduction to C Language
Introduction to C LanguageIntroduction to C Language
Introduction to C Language
 

Similar to Learn C++ at ASIT

C Programming- Harsh Sharma
C Programming- Harsh SharmaC Programming- Harsh Sharma
C Programming- Harsh Sharma
Harsh Sharma
 
1. Introduction to C++ and brief history
1. Introduction to C++ and brief history1. Introduction to C++ and brief history
1. Introduction to C++ and brief history
Ahmad177077
 
Unit 2 ppt
Unit 2 pptUnit 2 ppt
Unit 2 ppt
Mitali Chugh
 
Introduction to C++,Computer Science
Introduction to C++,Computer ScienceIntroduction to C++,Computer Science
Introduction to C++,Computer Science
Abhinav Vishnoi
 
Unit 2 l1
Unit 2 l1Unit 2 l1
Unit 2 l1
Mitali Chugh
 
Programming
ProgrammingProgramming
Programming
mafffffe19
 
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
PushkarNiroula1
 
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTTC programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
Batra Centre
 
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
ssuserf86fba
 
CS8251_QB_answers.pdf
CS8251_QB_answers.pdfCS8251_QB_answers.pdf
CS8251_QB_answers.pdf
vino108206
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptx
Mugilvannan11
 
67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdf67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdf
Rajb54
 
Prog1-L1.pdf
Prog1-L1.pdfProg1-L1.pdf
Prog1-L1.pdf
valerie5142000
 
Cp week _2.
Cp week _2.Cp week _2.
Cp week _2.
shahidullah57
 
Unit-2_Getting Started With ‘C’ Language (3).pptx
Unit-2_Getting Started With ‘C’ Language (3).pptxUnit-2_Getting Started With ‘C’ Language (3).pptx
Unit-2_Getting Started With ‘C’ Language (3).pptx
SanketShah544615
 
Unit-1 (introduction to c language).pptx
Unit-1 (introduction to c language).pptxUnit-1 (introduction to c language).pptx
Unit-1 (introduction to c language).pptx
saivasu4
 
Introduction to c language
Introduction to c language Introduction to c language
Introduction to c language
BAKRANIYA KALPESH
 
C language introduction geeksfor geeks
C language introduction   geeksfor geeksC language introduction   geeksfor geeks
C language introduction geeksfor geeks
AashutoshChhedavi
 
C++ language basic
C++ language basicC++ language basic
C++ language basic
Waqar Younis
 

Similar to Learn C++ at ASIT (20)

C Programming- Harsh Sharma
C Programming- Harsh SharmaC Programming- Harsh Sharma
C Programming- Harsh Sharma
 
1. Introduction to C++ and brief history
1. Introduction to C++ and brief history1. Introduction to C++ and brief history
1. Introduction to C++ and brief history
 
Unit 2 ppt
Unit 2 pptUnit 2 ppt
Unit 2 ppt
 
Introduction to C++,Computer Science
Introduction to C++,Computer ScienceIntroduction to C++,Computer Science
Introduction to C++,Computer Science
 
Unit 2 l1
Unit 2 l1Unit 2 l1
Unit 2 l1
 
Programming
ProgrammingProgramming
Programming
 
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
 
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTTC programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
 
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
 
CS8251_QB_answers.pdf
CS8251_QB_answers.pdfCS8251_QB_answers.pdf
CS8251_QB_answers.pdf
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptx
 
67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdf67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdf
 
Prog1-L1.pdf
Prog1-L1.pdfProg1-L1.pdf
Prog1-L1.pdf
 
Cp week _2.
Cp week _2.Cp week _2.
Cp week _2.
 
Unit-2_Getting Started With ‘C’ Language (3).pptx
Unit-2_Getting Started With ‘C’ Language (3).pptxUnit-2_Getting Started With ‘C’ Language (3).pptx
Unit-2_Getting Started With ‘C’ Language (3).pptx
 
Programming in c
Programming in cProgramming in c
Programming in c
 
Unit-1 (introduction to c language).pptx
Unit-1 (introduction to c language).pptxUnit-1 (introduction to c language).pptx
Unit-1 (introduction to c language).pptx
 
Introduction to c language
Introduction to c language Introduction to c language
Introduction to c language
 
C language introduction geeksfor geeks
C language introduction   geeksfor geeksC language introduction   geeksfor geeks
C language introduction geeksfor geeks
 
C++ language basic
C++ language basicC++ language basic
C++ language basic
 

More from ASIT

Asit education student review
Asit education student reviewAsit education student review
Asit education student review
ASIT
 
ASIT EDUCATION STUDENT REVIEWS
ASIT EDUCATION STUDENT REVIEWSASIT EDUCATION STUDENT REVIEWS
ASIT EDUCATION STUDENT REVIEWS
ASIT
 
Asit Education
Asit EducationAsit Education
Asit Education
ASIT
 
Asit Education Student Reviews
Asit Education Student ReviewsAsit Education Student Reviews
Asit Education Student Reviews
ASIT
 
Asit education Student review
Asit education Student reviewAsit education Student review
Asit education Student review
ASIT
 
ASIT EDUCATION REVIEW
ASIT EDUCATION REVIEWASIT EDUCATION REVIEW
ASIT EDUCATION REVIEW
ASIT
 
Asit Never Cheats Unemployes
Asit Never Cheats UnemployesAsit Never Cheats Unemployes
Asit Never Cheats UnemployesASIT
 
Latest News on Amc Square Asit
Latest News on Amc Square AsitLatest News on Amc Square Asit
Latest News on Amc Square Asit
ASIT
 
Asit amc never cheats students
Asit amc never cheats studentsAsit amc never cheats students
Asit amc never cheats studentsASIT
 
News on AMC Square ASIT
News on AMC Square ASITNews on AMC Square ASIT
News on AMC Square ASIT
ASIT
 
News on Asit Amc
News on Asit AmcNews on Asit Amc
News on Asit Amc
ASIT
 
Time Management
Time ManagementTime Management
Time Management
ASIT
 
learn Ruby at ASIT
learn Ruby at ASITlearn Ruby at ASIT
learn Ruby at ASIT
ASIT
 
introduction to Mongodb
introduction to Mongodbintroduction to Mongodb
introduction to Mongodb
ASIT
 
introduction to hadoop
introduction to hadoopintroduction to hadoop
introduction to hadoop
ASIT
 
ASIT REVIEWS
ASIT REVIEWSASIT REVIEWS
ASIT REVIEWS
ASIT
 
ASIT REVIEWS
ASIT REVIEWSASIT REVIEWS
ASIT REVIEWS
ASIT
 
Learn REST API at ASIT
Learn REST API at ASITLearn REST API at ASIT
Learn REST API at ASIT
ASIT
 
Learn C LANGUAGE at ASIT
Learn C LANGUAGE at ASITLearn C LANGUAGE at ASIT
Learn C LANGUAGE at ASIT
ASIT
 
Learn Advanced JAVA at ASIT
Learn Advanced JAVA at ASITLearn Advanced JAVA at ASIT
Learn Advanced JAVA at ASIT
ASIT
 

More from ASIT (20)

Asit education student review
Asit education student reviewAsit education student review
Asit education student review
 
ASIT EDUCATION STUDENT REVIEWS
ASIT EDUCATION STUDENT REVIEWSASIT EDUCATION STUDENT REVIEWS
ASIT EDUCATION STUDENT REVIEWS
 
Asit Education
Asit EducationAsit Education
Asit Education
 
Asit Education Student Reviews
Asit Education Student ReviewsAsit Education Student Reviews
Asit Education Student Reviews
 
Asit education Student review
Asit education Student reviewAsit education Student review
Asit education Student review
 
ASIT EDUCATION REVIEW
ASIT EDUCATION REVIEWASIT EDUCATION REVIEW
ASIT EDUCATION REVIEW
 
Asit Never Cheats Unemployes
Asit Never Cheats UnemployesAsit Never Cheats Unemployes
Asit Never Cheats Unemployes
 
Latest News on Amc Square Asit
Latest News on Amc Square AsitLatest News on Amc Square Asit
Latest News on Amc Square Asit
 
Asit amc never cheats students
Asit amc never cheats studentsAsit amc never cheats students
Asit amc never cheats students
 
News on AMC Square ASIT
News on AMC Square ASITNews on AMC Square ASIT
News on AMC Square ASIT
 
News on Asit Amc
News on Asit AmcNews on Asit Amc
News on Asit Amc
 
Time Management
Time ManagementTime Management
Time Management
 
learn Ruby at ASIT
learn Ruby at ASITlearn Ruby at ASIT
learn Ruby at ASIT
 
introduction to Mongodb
introduction to Mongodbintroduction to Mongodb
introduction to Mongodb
 
introduction to hadoop
introduction to hadoopintroduction to hadoop
introduction to hadoop
 
ASIT REVIEWS
ASIT REVIEWSASIT REVIEWS
ASIT REVIEWS
 
ASIT REVIEWS
ASIT REVIEWSASIT REVIEWS
ASIT REVIEWS
 
Learn REST API at ASIT
Learn REST API at ASITLearn REST API at ASIT
Learn REST API at ASIT
 
Learn C LANGUAGE at ASIT
Learn C LANGUAGE at ASITLearn C LANGUAGE at ASIT
Learn C LANGUAGE at ASIT
 
Learn Advanced JAVA at ASIT
Learn Advanced JAVA at ASITLearn Advanced JAVA at ASIT
Learn Advanced JAVA at ASIT
 

Recently uploaded

Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
DhatriParmar
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
goswamiyash170123
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 

Recently uploaded (20)

Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 

Learn C++ at ASIT

  • 1. Introduction to C++ C is a programming language developed in the 1970's alongside the UNIX operating system. C provides a comprehensive set of features for handling a wide variety of applications, such as systems development and scientific computation. C++ is an “extension” of the C language, in that most C programs are also C++ programs. C++, as opposed to C, supports “object-oriented programming.”
  • 2. General form of a C++ program : // Program description #include directives int main() { constant declarations variable declarations executable statements return 0; }
  • 3. C++ keywords Keywords appear in blue in Visual C++. Each keyword has a predefined purpose in the language. Do not use keywords as variable and constant names!! The complete list of keywords is on page 673 of the textbook. We shall cover the following keywords in this class: bool, break, case, char, const, continue, do, default, double, else, extern, false, float, for, if, int, long, namespace, return, short, static, struct, switch, typedef, true, unsigned, void, while
  • 4. Example 0 – adding 2 numbers Peter: Hey Frank, I just learned how to add two numbers together. Frank: Cool! Peter : Give me the first number. Frank: 2. Peter : Ok, and give me the second number. Frank: 5. Peter : Ok, here's the answer: 2 + 5 = 7. Frank: Wow! You are amazing! after Frank says “2”, Peter has to keep this number in his mind. after Frank says “5”, Peter also needs to keep this number in his mind. First number : 2 second number : 5 Sum : 7
  • 5. C++ comments Comments appear in green in Visual C++. Comments are explanatory notes; they are ignored by the compiler. There are two ways to include comments in a program: // A double slash marks the start of a //single line comment. /* A slash followed by an asterisk marks the start of a multiple line comment. It ends with an asterisk followed by a slash. */
  • 6. C++ compiler directives Compiler directives appear in blue in Visual C++. The #include directive tells the compiler to include some already existing C++ code in your program. The included file is then linked with the program. There are two forms of #include statements: #include <iostream> //for pre-defined files #include "my_lib.h" //for user-defined files
  • 7. Programming Style (cont. ) In order to improve the readability of your program, use the following conventions: Start the program with a header that tells what the program does. Use meaningful variable names. Document each variable declaration with a comment telling what the variable is used for. Place each executable statement on a single line. A segment of code is a sequence of executable statements that belong together. Use blank lines to separate different segments of code. Document each segment of code with a comment telling what the segment does.
  • 8. For more details www.asit.amcsquare.com Wise Machines India Pvt Ltd # 360, Sri Sai Padma Arcade, Varthur Main Road, Ramagondanahalli, Whitefield ,Bangalore – 560066 9740377262 * we also have branches in Hyderabad and Chennai we provide online and classroom training for C++