SlideShare a Scribd company logo
1 of 10
Learn C++ at
AMC Square Learning
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
C++ identifiers
Identifiers appear in black in Visual C++.
• An identifier is a name for a variable, constant, function, etc.
• It consists of a letter followed by any sequence of letters, digits, and
underscores.
• Examples of valid identifiers: First_name, age, y2000,
y2k
• Examples of invalid identifiers: 2000y
• Identifiers cannot have special characters in them. For example:
X=Y, J-20, ~Ricky,*Michael are invalid identifiers.
• Identifiers are case-sensitive. For example: Hello, hello,
WHOAMI, WhoAmI, whoami are unique identifiers.
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
C++ is a free-format language, which means that:
•Extra blanks (spaces) or tabs before or after
identifiers/operators are ignored.
•Blank lines are ignored by the compiler just like
comments.
•Code can be indented in any way.
•There can be more than one statement on a single line.
•A single statement can continue over several lines.
Thank you
Thank you

More Related Content

What's hot

Introduction to c_language
Introduction to c_languageIntroduction to c_language
Introduction to c_languageWay2itech
 
Goethe-Zertifikat C1 in German
Goethe-Zertifikat C1 in GermanGoethe-Zertifikat C1 in German
Goethe-Zertifikat C1 in GermanEmery Matthews
 
Introduction to C Language
Introduction to C LanguageIntroduction to C Language
Introduction to C LanguageTarun Sharma
 
C Programming- Harsh Sharma
C Programming- Harsh SharmaC Programming- Harsh Sharma
C Programming- Harsh SharmaHarsh Sharma
 
C programming short notes by pulkit modi
C programming short notes by pulkit modiC programming short notes by pulkit modi
C programming short notes by pulkit modiPulkitmodi1998
 
用Flutter 開發Linux Desktop Application
用Flutter 開發Linux Desktop Application用Flutter 開發Linux Desktop Application
用Flutter 開發Linux Desktop ApplicationWan Leung Wong
 
IP Lab Manual for Kerala University 3 Year UG Programme
IP Lab Manual for Kerala University 3 Year UG ProgrammeIP Lab Manual for Kerala University 3 Year UG Programme
IP Lab Manual for Kerala University 3 Year UG ProgrammeSAFAD ISMAIL
 
Code blocks – open source ide
Code blocks – open source ideCode blocks – open source ide
Code blocks – open source ideSave the Children
 
Programming languages
Programming languagesProgramming languages
Programming languagesRâhûl Røy
 
C programming introduction
C programming introductionC programming introduction
C programming introductionDucat
 
Introduction to Programming using C/C++
Introduction to Programming using C/C++Introduction to Programming using C/C++
Introduction to Programming using C/C++Dr Piyush Charan
 
Intro to cprogramming
Intro to cprogrammingIntro to cprogramming
Intro to cprogrammingskashwin98
 

What's hot (20)

Introduction to c_language
Introduction to c_languageIntroduction to c_language
Introduction to c_language
 
Programming C Part 01
Programming C Part 01 Programming C Part 01
Programming C Part 01
 
C# Introduction brief
C# Introduction briefC# Introduction brief
C# Introduction brief
 
C sharp chap1
C sharp chap1C sharp chap1
C sharp chap1
 
What is c++ programming
What is c++ programmingWhat is c++ programming
What is c++ programming
 
Goethe-Zertifikat C1 in German
Goethe-Zertifikat C1 in GermanGoethe-Zertifikat C1 in German
Goethe-Zertifikat C1 in German
 
Est 102 ppt1
Est 102 ppt1Est 102 ppt1
Est 102 ppt1
 
Introduction to C Language
Introduction to C LanguageIntroduction to C Language
Introduction to C Language
 
C Programming- Harsh Sharma
C Programming- Harsh SharmaC Programming- Harsh Sharma
C Programming- Harsh Sharma
 
C programming short notes by pulkit modi
C programming short notes by pulkit modiC programming short notes by pulkit modi
C programming short notes by pulkit modi
 
Chaptr 1
Chaptr 1Chaptr 1
Chaptr 1
 
用Flutter 開發Linux Desktop Application
用Flutter 開發Linux Desktop Application用Flutter 開發Linux Desktop Application
用Flutter 開發Linux Desktop Application
 
IP Lab Manual for Kerala University 3 Year UG Programme
IP Lab Manual for Kerala University 3 Year UG ProgrammeIP Lab Manual for Kerala University 3 Year UG Programme
IP Lab Manual for Kerala University 3 Year UG Programme
 
Code blocks – open source ide
Code blocks – open source ideCode blocks – open source ide
Code blocks – open source ide
 
CV CSharp Developer
CV CSharp DeveloperCV CSharp Developer
CV CSharp Developer
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
175035 cse lab 01
175035 cse lab 01175035 cse lab 01
175035 cse lab 01
 
C programming introduction
C programming introductionC programming introduction
C programming introduction
 
Introduction to Programming using C/C++
Introduction to Programming using C/C++Introduction to Programming using C/C++
Introduction to Programming using C/C++
 
Intro to cprogramming
Intro to cprogrammingIntro to cprogramming
Intro to cprogramming
 

Similar to Learn cpp at amc square learning

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).pptxsaivasu4
 
Object oriented programming 7 first steps in oop using c++
Object oriented programming 7 first steps in oop using  c++Object oriented programming 7 first steps in oop using  c++
Object oriented programming 7 first steps in oop using c++Vaibhav Khanna
 
Summer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptxSummer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptxshokeenk14
 
Introduction to C++,Computer Science
Introduction to C++,Computer ScienceIntroduction to C++,Computer Science
Introduction to C++,Computer ScienceAbhinav Vishnoi
 
Introduction to C Language (By: Shujaat Abbas)
Introduction to C Language (By: Shujaat Abbas)Introduction to C Language (By: Shujaat Abbas)
Introduction to C Language (By: Shujaat Abbas)Shujaat Abbas
 
Basics of C Lecture 2[16097].pptx
Basics of C Lecture 2[16097].pptxBasics of C Lecture 2[16097].pptx
Basics of C Lecture 2[16097].pptxCoolGamer16
 
490450755-Chapter-2.ppt
490450755-Chapter-2.ppt490450755-Chapter-2.ppt
490450755-Chapter-2.pptManiMala75
 
490450755-Chapter-2.ppt
490450755-Chapter-2.ppt490450755-Chapter-2.ppt
490450755-Chapter-2.pptManiMala75
 
Chapter 1: Introduction
Chapter 1: IntroductionChapter 1: Introduction
Chapter 1: IntroductionEric Chou
 
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTREC & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTREjatin batra
 
c programming, internshala training , govt engineering college aurangabad
c programming, internshala training , govt engineering college aurangabadc programming, internshala training , govt engineering college aurangabad
c programming, internshala training , govt engineering college aurangabadPysh1
 

Similar to Learn cpp at amc square learning (20)

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
 
8844632.ppt
8844632.ppt8844632.ppt
8844632.ppt
 
Object oriented programming 7 first steps in oop using c++
Object oriented programming 7 first steps in oop using  c++Object oriented programming 7 first steps in oop using  c++
Object oriented programming 7 first steps in oop using c++
 
C language unit-1
C language unit-1C language unit-1
C language unit-1
 
C LANGUAGE UNIT-1 PREPARED BY M V BRAHMANANDA REDDY
C LANGUAGE UNIT-1 PREPARED BY M V BRAHMANANDA REDDYC LANGUAGE UNIT-1 PREPARED BY M V BRAHMANANDA REDDY
C LANGUAGE UNIT-1 PREPARED BY M V BRAHMANANDA REDDY
 
C languaGE UNIT-1
C languaGE UNIT-1C languaGE UNIT-1
C languaGE UNIT-1
 
Introduction to c++ ppt 1
Introduction to c++ ppt 1Introduction to c++ ppt 1
Introduction to c++ ppt 1
 
C_Programming_Notes_ICE
C_Programming_Notes_ICEC_Programming_Notes_ICE
C_Programming_Notes_ICE
 
Unit 2 ppt
Unit 2 pptUnit 2 ppt
Unit 2 ppt
 
Summer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptxSummer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptx
 
Introduction to C++,Computer Science
Introduction to C++,Computer ScienceIntroduction to C++,Computer Science
Introduction to C++,Computer Science
 
Introduction to C Language (By: Shujaat Abbas)
Introduction to C Language (By: Shujaat Abbas)Introduction to C Language (By: Shujaat Abbas)
Introduction to C Language (By: Shujaat Abbas)
 
Basics of C Lecture 2[16097].pptx
Basics of C Lecture 2[16097].pptxBasics of C Lecture 2[16097].pptx
Basics of C Lecture 2[16097].pptx
 
Unit ii
Unit   iiUnit   ii
Unit ii
 
490450755-Chapter-2.ppt
490450755-Chapter-2.ppt490450755-Chapter-2.ppt
490450755-Chapter-2.ppt
 
490450755-Chapter-2.ppt
490450755-Chapter-2.ppt490450755-Chapter-2.ppt
490450755-Chapter-2.ppt
 
Chapter 1: Introduction
Chapter 1: IntroductionChapter 1: Introduction
Chapter 1: Introduction
 
Programming
ProgrammingProgramming
Programming
 
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTREC & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
 
c programming, internshala training , govt engineering college aurangabad
c programming, internshala training , govt engineering college aurangabadc programming, internshala training , govt engineering college aurangabad
c programming, internshala training , govt engineering college aurangabad
 

More from ASIT Education

COMMON PROBLEMS FACING WITH TABLETS
COMMON PROBLEMS FACING WITH TABLETSCOMMON PROBLEMS FACING WITH TABLETS
COMMON PROBLEMS FACING WITH TABLETSASIT Education
 
Simple hardware problems facing in pc's
Simple hardware problems facing in pc'sSimple hardware problems facing in pc's
Simple hardware problems facing in pc'sASIT Education
 
Amc square IT services
Amc square IT servicesAmc square IT services
Amc square IT servicesASIT Education
 
learn JAVA at ASIT with a placement assistance.
learn JAVA at ASIT with a placement assistance.learn JAVA at ASIT with a placement assistance.
learn JAVA at ASIT with a placement assistance.ASIT Education
 
Learn my sql at amc square learning
Learn my sql at amc square learningLearn my sql at amc square learning
Learn my sql at amc square learningASIT Education
 
Learn joomla at amc square learning
Learn joomla at amc square learningLearn joomla at amc square learning
Learn joomla at amc square learningASIT Education
 
learn ANDROID at AMC Square Learning
learn ANDROID at AMC Square Learninglearn ANDROID at AMC Square Learning
learn ANDROID at AMC Square LearningASIT Education
 
Learn spring at amc square learning
Learn spring at amc square learningLearn spring at amc square learning
Learn spring at amc square learningASIT Education
 
Learn perl in amc square learning
Learn perl in amc square learningLearn perl in amc square learning
Learn perl in amc square learningASIT Education
 
Learn c sharp at amc square learning
Learn c sharp at amc square learningLearn c sharp at amc square learning
Learn c sharp at amc square learningASIT Education
 
Learn Ruby Programming in Amc Square Learning
Learn Ruby Programming in Amc Square LearningLearn Ruby Programming in Amc Square Learning
Learn Ruby Programming in Amc Square LearningASIT Education
 
learn sharepoint at AMC Square learning
learn sharepoint at AMC Square learninglearn sharepoint at AMC Square learning
learn sharepoint at AMC Square learningASIT Education
 
Introduction to software testing
Introduction to software testingIntroduction to software testing
Introduction to software testingASIT Education
 
C programmimng basic.ppt
C programmimng basic.pptC programmimng basic.ppt
C programmimng basic.pptASIT Education
 
Ruby programming introduction
Ruby programming introductionRuby programming introduction
Ruby programming introductionASIT Education
 
Introduction to vm ware
Introduction to vm wareIntroduction to vm ware
Introduction to vm wareASIT Education
 
Introduction to software testing
Introduction to software testingIntroduction to software testing
Introduction to software testingASIT Education
 
Introduction to phython programming
Introduction to phython programmingIntroduction to phython programming
Introduction to phython programmingASIT Education
 
Introduction to java programming
Introduction to java programmingIntroduction to java programming
Introduction to java programmingASIT Education
 
Introduction to internet
Introduction to internetIntroduction to internet
Introduction to internetASIT Education
 

More from ASIT Education (20)

COMMON PROBLEMS FACING WITH TABLETS
COMMON PROBLEMS FACING WITH TABLETSCOMMON PROBLEMS FACING WITH TABLETS
COMMON PROBLEMS FACING WITH TABLETS
 
Simple hardware problems facing in pc's
Simple hardware problems facing in pc'sSimple hardware problems facing in pc's
Simple hardware problems facing in pc's
 
Amc square IT services
Amc square IT servicesAmc square IT services
Amc square IT services
 
learn JAVA at ASIT with a placement assistance.
learn JAVA at ASIT with a placement assistance.learn JAVA at ASIT with a placement assistance.
learn JAVA at ASIT with a placement assistance.
 
Learn my sql at amc square learning
Learn my sql at amc square learningLearn my sql at amc square learning
Learn my sql at amc square learning
 
Learn joomla at amc square learning
Learn joomla at amc square learningLearn joomla at amc square learning
Learn joomla at amc square learning
 
learn ANDROID at AMC Square Learning
learn ANDROID at AMC Square Learninglearn ANDROID at AMC Square Learning
learn ANDROID at AMC Square Learning
 
Learn spring at amc square learning
Learn spring at amc square learningLearn spring at amc square learning
Learn spring at amc square learning
 
Learn perl in amc square learning
Learn perl in amc square learningLearn perl in amc square learning
Learn perl in amc square learning
 
Learn c sharp at amc square learning
Learn c sharp at amc square learningLearn c sharp at amc square learning
Learn c sharp at amc square learning
 
Learn Ruby Programming in Amc Square Learning
Learn Ruby Programming in Amc Square LearningLearn Ruby Programming in Amc Square Learning
Learn Ruby Programming in Amc Square Learning
 
learn sharepoint at AMC Square learning
learn sharepoint at AMC Square learninglearn sharepoint at AMC Square learning
learn sharepoint at AMC Square learning
 
Introduction to software testing
Introduction to software testingIntroduction to software testing
Introduction to software testing
 
C programmimng basic.ppt
C programmimng basic.pptC programmimng basic.ppt
C programmimng basic.ppt
 
Ruby programming introduction
Ruby programming introductionRuby programming introduction
Ruby programming introduction
 
Introduction to vm ware
Introduction to vm wareIntroduction to vm ware
Introduction to vm ware
 
Introduction to software testing
Introduction to software testingIntroduction to software testing
Introduction to software testing
 
Introduction to phython programming
Introduction to phython programmingIntroduction to phython programming
Introduction to phython programming
 
Introduction to java programming
Introduction to java programmingIntroduction to java programming
Introduction to java programming
 
Introduction to internet
Introduction to internetIntroduction to internet
Introduction to internet
 

Recently uploaded

Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 

Recently uploaded (20)

Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 

Learn cpp at amc square learning

  • 1. Learn C++ at AMC Square Learning
  • 2. 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.”
  • 3. General form of a C++ program // Program description #include directives int main() { constant declarations variable declarations executable statements return 0; }
  • 4. 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
  • 5. C++ identifiers Identifiers appear in black in Visual C++. • An identifier is a name for a variable, constant, function, etc. • It consists of a letter followed by any sequence of letters, digits, and underscores. • Examples of valid identifiers: First_name, age, y2000, y2k • Examples of invalid identifiers: 2000y • Identifiers cannot have special characters in them. For example: X=Y, J-20, ~Ricky,*Michael are invalid identifiers. • Identifiers are case-sensitive. For example: Hello, hello, WHOAMI, WhoAmI, whoami are unique identifiers.
  • 6. 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. */
  • 7. 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
  • 8. Programming Style C++ is a free-format language, which means that: •Extra blanks (spaces) or tabs before or after identifiers/operators are ignored. •Blank lines are ignored by the compiler just like comments. •Code can be indented in any way. •There can be more than one statement on a single line. •A single statement can continue over several lines.