SlideShare a Scribd company logo
FCPIT ASSIGNMENT NO. โ€“ 1
Overview of C++ Language
SUBMITTED By: Name: Priyanka
Class: CSE -2

SUBMITTED To:-

Department Of Computer Science
Guru Nanak Dev Engineering College, Gill Park, Ludhiana
Table of Contents
1.
2.
3.
4.
5.

Introduction about c++
Evolution of c++
General structure of program
Program development life cycle
Programming style
INTRODUCTION

The C++ programming language is a very powerful general โ€“ purpose
programming language that supports procedural programming as well as
object โ€“ oriented programming. It incorporates all the ingredients required
for building software for large and complex problems.
The C++ language is treated as super set of C language because
the developer of C++ language have retained all features of C,
enhanced some of the existing features, and incorporated new features to
support for object โ€“ oriented programming.
The importance of C++ can well be judged from the following statement:
โ€œObject โ€“ Oriented Technology is regarded as the ultimate
paradigm for the modeling of information, be that information data or
logic. The C++ has by now shown to fulfill this goal.โ€
EVOLUTION OF C++ LANGUAGE

The C++ programming language was developed by Bjarne Stroustrup at AT&T
BELL LABORATORIES, NEW JERSEY, USA, in the early 1980โ€™s. He found
that as the problem size and complexity grows, it becomes extremely difficult to
manage it using most of procedural languages, even with C language.
He was strong admirer of Simula67 and C languages, and wanted to have a
language that combines the best of both of the languages, i.e., a language that
support object โ€“ oriented programming and have power and elegance of C
language. The outcome of this effort ultimately leads to the development of C++.
Since the classes were a major addition to the original C language, he initially
called the new language โ€˜C with classesโ€™. However, later in 1983, the name was
changed to C++. The idea of suffixing C with ++ came from the increment
operator, since new features that existed and being used since long.
GENERAL STRUCTURE OF A C++ PROGRAM
SECTION 1: COMMENTS
SECTION 2: PREPROCESSOR DIRECTIVES

SECTION 3: GLOBAL DECLARATIONS

SECTION 4:
Void main
{
local declarations
statements
}
SECTION 5: OTHER FUNCTIONS AS REQUIRED
SECTION 1 is optional . It contains the description about the program.
SECTION 2 contains the preprocessor directives. The frequently used preprocessor
directives are include and define. These directives tell the preprocessor how to prepare
the program for compilation. The include directive tells which header files are to be
included in the program and the define directive is usually used to associate an
identifier with a literal that is to be used at many places in the program.
SECTION 3 is optional. It contains the global declarations. These declarations usually
include the declaration of the data items which are to be shared between many
functions in the program. It also include the decorations of functions.
SECTION 4 contains the main function. The execution of the program always begins
with the execution of the main function. The main function can call any number of
other functions, and those called function can further call other functions.
SECTION 5 is also optional. If present, it contains the other functions.
PROGRAM DEVELOPMENT LIFE CYCLE

Program development life cycle (PDLC) is a systematic way of
developing quality programs. It provides an organized plan for
breaking down the task of program development into manageable
chunks, each of which must be successfully completed before moving
on to the next phase. The program development process is divided
into following phases:
DEFINING THE PROBLEM ๏ƒ  The first step in developing a
program is to define the problem. The program specification precisely
defines the input data, the processing that should take place, the
format of the output reports and the user interface.
DESIGNING THE PROGRAM ๏ƒ  Program design begins by focusing on the main
goal that the program is trying to achieve and then breaking the program into
manageable components, each of which contributes to this goal. The first step involves
identifying the main routine which is the programโ€™s major activity. From there,
programmers try to break down the various components of the main routine into
smaller units called modules, until each module is highly focused.
The various familiar program design tools are :STRUCTURE CHARTS โ€“ A structure chart, also called hierarchy chart, show the
top-down design of a program. Each box in the chart indicates a task that the program
must accomplish.
ALGORITHMS โ€“ An algorithm is a step-by-step description of how to arrive at a
solution.
FLOWCHARTS โ€“ A flowchart is a diagram that shows the logic of the program.
PSEUDOCODES โ€“ A pseudo code is another tool to describe the way to arrive at a
solution.
// C++ simple example
#include <iostream> //for C++ Input and Output
int main ()
{
int number3;
std::cout << "Enter a number:";
std::cin >> number3;
int number2, sum;
std::cout << "Enter another number:";
std::cin >> number2;
sum = number2 + number3;
std::cout << "Sum is: " << sum <<std::endl;
}

return 0;
BUILDING THE PROGRAM
Once the design of the program is ready, the next step is to convert the program
design into a computer.
CREATING AND EDITING PROGRAMS
We key in computer memory using a text editor. A text editor helps us to enter the
character data into computer memory, allows editing the data in computer
memory, and save the data from memory in a disk file on secondary memory with
extension โ€œ.cppโ€. This stored file is known as source file, and its contents are
known as source code.
COMPILING PROGRAM
The source code in the source file, stored on the disk, must to be translated into
machine language. This job is done by the compiler. The C++ compiler actually is a
combination of two separate programs โ€“ the preprocessor and the translator.
The preprocessor reads the source code and prepares it for translation.
The translator reads the translation unit instruction-by-instruction and checks them for
their grammatical accuracy. If there is a syntax error in it, it flags an error message โ€“
called diagnostic message on the screen.
LINKING PROGRAM
Once the source code is translated into object code, though it is in machine
language, still it is not in executable form.
A linker is a development tool that extracts the referred library functions from the
system libraries, reads the object codes of the user-defined functions from the
object files and integrates them with the current object code to produce the final
executable code, which is stored in disk file with extension โ€œ*.exeโ€. This
executable code is the final form of the program that is ready for execution.
EXECUTING PROGRAMS
Once the program is linked, it is ready for execution. To execute a program we
give an operating system command, such as run, to load the program into
computer memory and execute it. The loader locates the executable program in
the secondary storage, reads it and brings into the computer memory.
TESTING THE PROGRAM

A logical error is a mistake that the programmer made while designing the
solution to the problem. The programmer must find and correct logical errors by
carefully examining the program output for a set of data for which results are
already known.

DOCUMENTING THE PROGRAM
After testing the program development is almost complete . The structure charts,
algorithm, pseudo code, flow charts developed during the design phase become
documentation for others who are associated with the program . All of this
documentations needs to be saved and placed together for future reference.
DEPLOYING AND MAINTAINING THE PROGRAM

In the final phase, the program is deployed at the users site. Here also, the program
is kept under watch till the user gives green signals to it. Even after the
development project is complete, it needs to be maintained and evaluated regularly.
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 for watching!

More Related Content

What's hot

Introduction Of C++
Introduction Of C++Introduction Of C++
Introduction Of C++
Sangharsh agarwal
ย 
Introduction to c++ ppt
Introduction to c++ pptIntroduction to c++ ppt
Introduction to c++ ppt
Prof. Dr. K. Adisesha
ย 
C++ programming
C++ programmingC++ programming
compiler vs interpreter
compiler vs interpretercompiler vs interpreter
compiler vs interpreter
Faculty of Science , portsaid Univeristy
ย 
Comparison between runtime polymorphism and compile time polymorphism
Comparison between runtime polymorphism and compile time polymorphismComparison between runtime polymorphism and compile time polymorphism
Comparison between runtime polymorphism and compile time polymorphism
CHAITALIUKE1
ย 
Preprocessor
PreprocessorPreprocessor
Preprocessor
lalithambiga kamaraj
ย 
Inline function
Inline functionInline function
Inline function
Tech_MX
ย 
C++
C++C++
C++
Shyam Khant
ย 
C++ presentation
C++ presentationC++ presentation
C++ presentation
SudhanshuVijay3
ย 
Variables in C Programming
Variables in C ProgrammingVariables in C Programming
Variables in C Programming
programming9
ย 
Introduction to c++ ppt 1
Introduction to c++ ppt 1Introduction to c++ ppt 1
Introduction to c++ ppt 1
Prof. Dr. K. Adisesha
ย 
Polymorphism in c++(ppt)
Polymorphism in c++(ppt)Polymorphism in c++(ppt)
Polymorphism in c++(ppt)
Sanjit Shaw
ย 
Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.
Md Hossen
ย 
Lecture 1- History of C Programming
Lecture 1- History of C Programming Lecture 1- History of C Programming
Lecture 1- History of C Programming
Md. Imran Hossain Showrov
ย 
Introduction to C++
Introduction to C++Introduction to C++
Introduction to C++
Sikder Tahsin Al-Amin
ย 
Programming with c#
Programming with c#Programming with c#
Programming with c#
Luis Goldster
ย 
C presentation
C presentationC presentation
C presentation
APSMIND TECHNOLOGY PVT LTD.
ย 
c-programming
c-programmingc-programming
c-programming
Zulhazmi Harith
ย 
C++ Programming Language
C++ Programming Language C++ Programming Language
C++ Programming Language
Mohamed Loey
ย 
Storage classes in C
Storage classes in CStorage classes in C
Storage classes in C
Nitesh Bichwani
ย 

What's hot (20)

Introduction Of C++
Introduction Of C++Introduction Of C++
Introduction Of C++
ย 
Introduction to c++ ppt
Introduction to c++ pptIntroduction to c++ ppt
Introduction to c++ ppt
ย 
C++ programming
C++ programmingC++ programming
C++ programming
ย 
compiler vs interpreter
compiler vs interpretercompiler vs interpreter
compiler vs interpreter
ย 
Comparison between runtime polymorphism and compile time polymorphism
Comparison between runtime polymorphism and compile time polymorphismComparison between runtime polymorphism and compile time polymorphism
Comparison between runtime polymorphism and compile time polymorphism
ย 
Preprocessor
PreprocessorPreprocessor
Preprocessor
ย 
Inline function
Inline functionInline function
Inline function
ย 
C++
C++C++
C++
ย 
C++ presentation
C++ presentationC++ presentation
C++ presentation
ย 
Variables in C Programming
Variables in C ProgrammingVariables in C Programming
Variables in C Programming
ย 
Introduction to c++ ppt 1
Introduction to c++ ppt 1Introduction to c++ ppt 1
Introduction to c++ ppt 1
ย 
Polymorphism in c++(ppt)
Polymorphism in c++(ppt)Polymorphism in c++(ppt)
Polymorphism in c++(ppt)
ย 
Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.
ย 
Lecture 1- History of C Programming
Lecture 1- History of C Programming Lecture 1- History of C Programming
Lecture 1- History of C Programming
ย 
Introduction to C++
Introduction to C++Introduction to C++
Introduction to C++
ย 
Programming with c#
Programming with c#Programming with c#
Programming with c#
ย 
C presentation
C presentationC presentation
C presentation
ย 
c-programming
c-programmingc-programming
c-programming
ย 
C++ Programming Language
C++ Programming Language C++ Programming Language
C++ Programming Language
ย 
Storage classes in C
Storage classes in CStorage classes in C
Storage classes in C
ย 

Viewers also liked

Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on Rails
mithunsasidharan
ย 
Intro to java programming
Intro to java programmingIntro to java programming
Intro to java programming
Eugene Stephens
ย 
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
Prof. Wim Van Criekinge
ย 
R Programming Overview
R Programming Overview R Programming Overview
R Programming Overview
dlamb3244
ย 
Overview HTML, HTML5 and Validations
Overview HTML, HTML5 and Validations Overview HTML, HTML5 and Validations
Overview HTML, HTML5 and Validations
Yaowaluck Promdee
ย 
Overview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUGOverview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUG
Marakana Inc.
ย 
What is Python? An overview of Python for science.
What is Python? An overview of Python for science.What is Python? An overview of Python for science.
What is Python? An overview of Python for science.
Nicholas Pringle
ย 
A brief overview of java frameworks
A brief overview of java frameworksA brief overview of java frameworks
A brief overview of java frameworks
MD Sayem Ahmed
ย 
Ruby Rails Overview
Ruby Rails OverviewRuby Rails Overview
Ruby Rails Overview
Netguru
ย 
CBSE Class XI Programming in C++
CBSE Class XI Programming in C++CBSE Class XI Programming in C++
CBSE Class XI Programming in C++
Pranav Ghildiyal
ย 
Multidimensional arrays in C++
Multidimensional arrays in C++Multidimensional arrays in C++
Multidimensional arrays in C++
Ilio Catallo
ย 
Cs1123 3 c++ overview
Cs1123 3 c++ overviewCs1123 3 c++ overview
Cs1123 3 c++ overview
TAlha MAlik
ย 
Understand Decision structures in c++ (cplusplus)
Understand Decision structures in c++ (cplusplus)Understand Decision structures in c++ (cplusplus)
Understand Decision structures in c++ (cplusplus)
Muhammad Tahir Bashir
ย 
Python overview
Python   overviewPython   overview
Python overview
Hemant Kumar Tiwary
ย 
Overview of c++ language
Overview of c++ language   Overview of c++ language
Overview of c++ language
samt7
ย 
Learn c++ Programming Language
Learn c++ Programming LanguageLearn c++ Programming Language
Learn c++ Programming Language
Steve Johnson
ย 
Revision notes for exam 2011 computer science with C++
Revision notes for exam 2011 computer science with C++Revision notes for exam 2011 computer science with C++
Revision notes for exam 2011 computer science with C++
Deepak Singh
ย 
Structure of C++ - R.D.Sivakumar
Structure of C++ - R.D.SivakumarStructure of C++ - R.D.Sivakumar
Structure of C++ - R.D.Sivakumar
Sivakumar R D .
ย 
Structure in c
Structure in cStructure in c

Viewers also liked (19)

Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on Rails
ย 
Intro to java programming
Intro to java programmingIntro to java programming
Intro to java programming
ย 
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
ย 
R Programming Overview
R Programming Overview R Programming Overview
R Programming Overview
ย 
Overview HTML, HTML5 and Validations
Overview HTML, HTML5 and Validations Overview HTML, HTML5 and Validations
Overview HTML, HTML5 and Validations
ย 
Overview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUGOverview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUG
ย 
What is Python? An overview of Python for science.
What is Python? An overview of Python for science.What is Python? An overview of Python for science.
What is Python? An overview of Python for science.
ย 
A brief overview of java frameworks
A brief overview of java frameworksA brief overview of java frameworks
A brief overview of java frameworks
ย 
Ruby Rails Overview
Ruby Rails OverviewRuby Rails Overview
Ruby Rails Overview
ย 
CBSE Class XI Programming in C++
CBSE Class XI Programming in C++CBSE Class XI Programming in C++
CBSE Class XI Programming in C++
ย 
Multidimensional arrays in C++
Multidimensional arrays in C++Multidimensional arrays in C++
Multidimensional arrays in C++
ย 
Cs1123 3 c++ overview
Cs1123 3 c++ overviewCs1123 3 c++ overview
Cs1123 3 c++ overview
ย 
Understand Decision structures in c++ (cplusplus)
Understand Decision structures in c++ (cplusplus)Understand Decision structures in c++ (cplusplus)
Understand Decision structures in c++ (cplusplus)
ย 
Python overview
Python   overviewPython   overview
Python overview
ย 
Overview of c++ language
Overview of c++ language   Overview of c++ language
Overview of c++ language
ย 
Learn c++ Programming Language
Learn c++ Programming LanguageLearn c++ Programming Language
Learn c++ Programming Language
ย 
Revision notes for exam 2011 computer science with C++
Revision notes for exam 2011 computer science with C++Revision notes for exam 2011 computer science with C++
Revision notes for exam 2011 computer science with C++
ย 
Structure of C++ - R.D.Sivakumar
Structure of C++ - R.D.SivakumarStructure of C++ - R.D.Sivakumar
Structure of C++ - R.D.Sivakumar
ย 
Structure in c
Structure in cStructure in c
Structure in c
ย 

Similar to Overview of c++

PROBLEM SOLVING
PROBLEM SOLVINGPROBLEM SOLVING
PROBLEM SOLVING
shahzadebaujiti
ย 
Stnotes doc 5
Stnotes doc 5Stnotes doc 5
Stnotes doc 5
Alok Jain
ย 
SULTHAN's - C Programming Language notes
SULTHAN's - C Programming Language notesSULTHAN's - C Programming Language notes
SULTHAN's - C Programming Language notes
SULTHAN BASHA
ย 
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
ย 
Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)
Nuzhat Memon
ย 
Programming in c
Programming in cProgramming in c
Programming in c
ankitjain851
ย 
Oosd lecture unit 4 ppt introduction part
Oosd lecture unit 4 ppt introduction partOosd lecture unit 4 ppt introduction part
Oosd lecture unit 4 ppt introduction part
ManuSingh669370
ย 
An introduction to programming
An introduction to programmingAn introduction to programming
An introduction to programming
rprajat007
ย 
Comso c++
Comso c++Comso c++
Comso c++
Mi L
ย 
[ITP - Lecture 02] Steps to Create Program & Approaches of Programming
[ITP - Lecture 02] Steps to Create Program & Approaches of Programming[ITP - Lecture 02] Steps to Create Program & Approaches of Programming
[ITP - Lecture 02] Steps to Create Program & Approaches of Programming
Muhammad Hammad Waseem
ย 
computer Unit 6
computer Unit 6computer Unit 6
computer Unit 6
Aqeel Rehman
ย 
Chapter 13.1.4
Chapter 13.1.4Chapter 13.1.4
Chapter 13.1.4
patcha535
ย 
C programming
C programming C programming
C programming
Rohan Gajre
ย 
PCCF UNIT 1.pptx
PCCF UNIT 1.pptxPCCF UNIT 1.pptx
PCCF UNIT 1.pptx
DivyaKS12
ย 
Introduction to c language
Introduction to c language Introduction to c language
Introduction to c language
BAKRANIYA KALPESH
ย 
CS3251-_PIC
CS3251-_PICCS3251-_PIC
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
Anandhasilambarasan D
ย 
Fundamentals of programming with C++
Fundamentals of programming with C++Fundamentals of programming with C++
Fundamentals of programming with C++
Seble Nigussie
ย 
Diploma ii cfpc u-1 introduction to c language
Diploma ii  cfpc u-1 introduction to c languageDiploma ii  cfpc u-1 introduction to c language
Diploma ii cfpc u-1 introduction to c language
Rai University
ย 
Procedural programming
Procedural programmingProcedural programming
Procedural programming
Ankit92Chitnavis
ย 

Similar to Overview of c++ (20)

PROBLEM SOLVING
PROBLEM SOLVINGPROBLEM SOLVING
PROBLEM SOLVING
ย 
Stnotes doc 5
Stnotes doc 5Stnotes doc 5
Stnotes doc 5
ย 
SULTHAN's - C Programming Language notes
SULTHAN's - C Programming Language notesSULTHAN's - C Programming Language notes
SULTHAN's - C Programming Language notes
ย 
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
ย 
Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)
ย 
Programming in c
Programming in cProgramming in c
Programming in c
ย 
Oosd lecture unit 4 ppt introduction part
Oosd lecture unit 4 ppt introduction partOosd lecture unit 4 ppt introduction part
Oosd lecture unit 4 ppt introduction part
ย 
An introduction to programming
An introduction to programmingAn introduction to programming
An introduction to programming
ย 
Comso c++
Comso c++Comso c++
Comso c++
ย 
[ITP - Lecture 02] Steps to Create Program & Approaches of Programming
[ITP - Lecture 02] Steps to Create Program & Approaches of Programming[ITP - Lecture 02] Steps to Create Program & Approaches of Programming
[ITP - Lecture 02] Steps to Create Program & Approaches of Programming
ย 
computer Unit 6
computer Unit 6computer Unit 6
computer Unit 6
ย 
Chapter 13.1.4
Chapter 13.1.4Chapter 13.1.4
Chapter 13.1.4
ย 
C programming
C programming C programming
C programming
ย 
PCCF UNIT 1.pptx
PCCF UNIT 1.pptxPCCF UNIT 1.pptx
PCCF UNIT 1.pptx
ย 
Introduction to c language
Introduction to c language Introduction to c language
Introduction to c language
ย 
CS3251-_PIC
CS3251-_PICCS3251-_PIC
CS3251-_PIC
ย 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
ย 
Fundamentals of programming with C++
Fundamentals of programming with C++Fundamentals of programming with C++
Fundamentals of programming with C++
ย 
Diploma ii cfpc u-1 introduction to c language
Diploma ii  cfpc u-1 introduction to c languageDiploma ii  cfpc u-1 introduction to c language
Diploma ii cfpc u-1 introduction to c language
ย 
Procedural programming
Procedural programmingProcedural programming
Procedural programming
ย 

Recently uploaded

Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
ย 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
ย 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
MJDuyan
ย 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
ย 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
ย 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
ย 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
ย 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
RamseyBerglund
ย 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
MysoreMuleSoftMeetup
ย 
Prรฉsentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Prรฉsentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrรฉsentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Prรฉsentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
ย 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
giancarloi8888
ย 
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDFLifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Vivekanand Anglo Vedic Academy
ย 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
ย 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
Steve Thomason
ย 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
ย 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
National Information Standards Organization (NISO)
ย 
Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH 8 Cแบข Nฤ‚M - GLOBAL SUCCESS - Nฤ‚M HแปŒC 2023-2024 (Cร“ FI...
Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH 8 Cแบข Nฤ‚M - GLOBAL SUCCESS - Nฤ‚M HแปŒC 2023-2024 (Cร“ FI...Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH 8 Cแบข Nฤ‚M - GLOBAL SUCCESS - Nฤ‚M HแปŒC 2023-2024 (Cร“ FI...
Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH 8 Cแบข Nฤ‚M - GLOBAL SUCCESS - Nฤ‚M HแปŒC 2023-2024 (Cร“ FI...
Nguyen Thanh Tu Collection
ย 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
ย 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
BoudhayanBhattachari
ย 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Henry Hollis
ย 

Recently uploaded (20)

Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
ย 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
ย 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
ย 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
ย 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
ย 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
ย 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
ย 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
ย 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
ย 
Prรฉsentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Prรฉsentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrรฉsentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Prรฉsentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
ย 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
ย 
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDFLifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
ย 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
ย 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
ย 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ย 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
ย 
Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH 8 Cแบข Nฤ‚M - GLOBAL SUCCESS - Nฤ‚M HแปŒC 2023-2024 (Cร“ FI...
Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH 8 Cแบข Nฤ‚M - GLOBAL SUCCESS - Nฤ‚M HแปŒC 2023-2024 (Cร“ FI...Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH 8 Cแบข Nฤ‚M - GLOBAL SUCCESS - Nฤ‚M HแปŒC 2023-2024 (Cร“ FI...
Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH 8 Cแบข Nฤ‚M - GLOBAL SUCCESS - Nฤ‚M HแปŒC 2023-2024 (Cร“ FI...
ย 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
ย 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
ย 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
ย 

Overview of c++

  • 1. FCPIT ASSIGNMENT NO. โ€“ 1 Overview of C++ Language SUBMITTED By: Name: Priyanka Class: CSE -2 SUBMITTED To:- Department Of Computer Science Guru Nanak Dev Engineering College, Gill Park, Ludhiana
  • 2. Table of Contents 1. 2. 3. 4. 5. Introduction about c++ Evolution of c++ General structure of program Program development life cycle Programming style
  • 3. INTRODUCTION The C++ programming language is a very powerful general โ€“ purpose programming language that supports procedural programming as well as object โ€“ oriented programming. It incorporates all the ingredients required for building software for large and complex problems. The C++ language is treated as super set of C language because the developer of C++ language have retained all features of C, enhanced some of the existing features, and incorporated new features to support for object โ€“ oriented programming. The importance of C++ can well be judged from the following statement: โ€œObject โ€“ Oriented Technology is regarded as the ultimate paradigm for the modeling of information, be that information data or logic. The C++ has by now shown to fulfill this goal.โ€
  • 4. EVOLUTION OF C++ LANGUAGE The C++ programming language was developed by Bjarne Stroustrup at AT&T BELL LABORATORIES, NEW JERSEY, USA, in the early 1980โ€™s. He found that as the problem size and complexity grows, it becomes extremely difficult to manage it using most of procedural languages, even with C language. He was strong admirer of Simula67 and C languages, and wanted to have a language that combines the best of both of the languages, i.e., a language that support object โ€“ oriented programming and have power and elegance of C language. The outcome of this effort ultimately leads to the development of C++. Since the classes were a major addition to the original C language, he initially called the new language โ€˜C with classesโ€™. However, later in 1983, the name was changed to C++. The idea of suffixing C with ++ came from the increment operator, since new features that existed and being used since long.
  • 5. GENERAL STRUCTURE OF A C++ PROGRAM SECTION 1: COMMENTS SECTION 2: PREPROCESSOR DIRECTIVES SECTION 3: GLOBAL DECLARATIONS SECTION 4: Void main { local declarations statements } SECTION 5: OTHER FUNCTIONS AS REQUIRED
  • 6. SECTION 1 is optional . It contains the description about the program. SECTION 2 contains the preprocessor directives. The frequently used preprocessor directives are include and define. These directives tell the preprocessor how to prepare the program for compilation. The include directive tells which header files are to be included in the program and the define directive is usually used to associate an identifier with a literal that is to be used at many places in the program. SECTION 3 is optional. It contains the global declarations. These declarations usually include the declaration of the data items which are to be shared between many functions in the program. It also include the decorations of functions. SECTION 4 contains the main function. The execution of the program always begins with the execution of the main function. The main function can call any number of other functions, and those called function can further call other functions. SECTION 5 is also optional. If present, it contains the other functions.
  • 7.
  • 8. PROGRAM DEVELOPMENT LIFE CYCLE Program development life cycle (PDLC) is a systematic way of developing quality programs. It provides an organized plan for breaking down the task of program development into manageable chunks, each of which must be successfully completed before moving on to the next phase. The program development process is divided into following phases: DEFINING THE PROBLEM ๏ƒ  The first step in developing a program is to define the problem. The program specification precisely defines the input data, the processing that should take place, the format of the output reports and the user interface.
  • 9. DESIGNING THE PROGRAM ๏ƒ  Program design begins by focusing on the main goal that the program is trying to achieve and then breaking the program into manageable components, each of which contributes to this goal. The first step involves identifying the main routine which is the programโ€™s major activity. From there, programmers try to break down the various components of the main routine into smaller units called modules, until each module is highly focused. The various familiar program design tools are :STRUCTURE CHARTS โ€“ A structure chart, also called hierarchy chart, show the top-down design of a program. Each box in the chart indicates a task that the program must accomplish. ALGORITHMS โ€“ An algorithm is a step-by-step description of how to arrive at a solution. FLOWCHARTS โ€“ A flowchart is a diagram that shows the logic of the program. PSEUDOCODES โ€“ A pseudo code is another tool to describe the way to arrive at a solution.
  • 10. // C++ simple example #include <iostream> //for C++ Input and Output int main () { int number3; std::cout << "Enter a number:"; std::cin >> number3; int number2, sum; std::cout << "Enter another number:"; std::cin >> number2; sum = number2 + number3; std::cout << "Sum is: " << sum <<std::endl; } return 0;
  • 11. BUILDING THE PROGRAM Once the design of the program is ready, the next step is to convert the program design into a computer. CREATING AND EDITING PROGRAMS We key in computer memory using a text editor. A text editor helps us to enter the character data into computer memory, allows editing the data in computer memory, and save the data from memory in a disk file on secondary memory with extension โ€œ.cppโ€. This stored file is known as source file, and its contents are known as source code. COMPILING PROGRAM The source code in the source file, stored on the disk, must to be translated into machine language. This job is done by the compiler. The C++ compiler actually is a combination of two separate programs โ€“ the preprocessor and the translator. The preprocessor reads the source code and prepares it for translation. The translator reads the translation unit instruction-by-instruction and checks them for their grammatical accuracy. If there is a syntax error in it, it flags an error message โ€“ called diagnostic message on the screen.
  • 12. LINKING PROGRAM Once the source code is translated into object code, though it is in machine language, still it is not in executable form. A linker is a development tool that extracts the referred library functions from the system libraries, reads the object codes of the user-defined functions from the object files and integrates them with the current object code to produce the final executable code, which is stored in disk file with extension โ€œ*.exeโ€. This executable code is the final form of the program that is ready for execution. EXECUTING PROGRAMS Once the program is linked, it is ready for execution. To execute a program we give an operating system command, such as run, to load the program into computer memory and execute it. The loader locates the executable program in the secondary storage, reads it and brings into the computer memory.
  • 13. TESTING THE PROGRAM A logical error is a mistake that the programmer made while designing the solution to the problem. The programmer must find and correct logical errors by carefully examining the program output for a set of data for which results are already known. DOCUMENTING THE PROGRAM After testing the program development is almost complete . The structure charts, algorithm, pseudo code, flow charts developed during the design phase become documentation for others who are associated with the program . All of this documentations needs to be saved and placed together for future reference.
  • 14. DEPLOYING AND MAINTAINING THE PROGRAM In the final phase, the program is deployed at the users site. Here also, the program is kept under watch till the user gives green signals to it. Even after the development project is complete, it needs to be maintained and evaluated regularly.
  • 15. 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.
  • 16. Thank you for watching!