Download - C++ Programming Language
![Page 1: C++ Programming Language](https://reader036.vdocuments.site/reader036/viewer/2022081412/544dbef6b1af9f4b068b4cb9/html5/thumbnails/1.jpg)
Presentation by: Mendoza&Nazal
![Page 2: C++ Programming Language](https://reader036.vdocuments.site/reader036/viewer/2022081412/544dbef6b1af9f4b068b4cb9/html5/thumbnails/2.jpg)
Presentation by: Mendoza&Nazal
![Page 3: C++ Programming Language](https://reader036.vdocuments.site/reader036/viewer/2022081412/544dbef6b1af9f4b068b4cb9/html5/thumbnails/3.jpg)
What is ?
Presentation by: Mendoza&Nazal
![Page 4: C++ Programming Language](https://reader036.vdocuments.site/reader036/viewer/2022081412/544dbef6b1af9f4b068b4cb9/html5/thumbnails/4.jpg)
What is C++?
It is an object-oriented programming (OOP) language that is viewed by many as the best language for creating large-scale applications. C++ is a superset of the C language.
Presentation by: Mendoza&Nazal
![Page 5: C++ Programming Language](https://reader036.vdocuments.site/reader036/viewer/2022081412/544dbef6b1af9f4b068b4cb9/html5/thumbnails/5.jpg)
What is C++?
A high-level programming language developed by Bjarne Stroustrup at Bell Labs. C++ adds object-oriented features to its predecessor, C.
Presentation by: Mendoza&Nazal
![Page 6: C++ Programming Language](https://reader036.vdocuments.site/reader036/viewer/2022081412/544dbef6b1af9f4b068b4cb9/html5/thumbnails/6.jpg)
History of C++
Presentation by: Mendoza&Nazal
![Page 7: C++ Programming Language](https://reader036.vdocuments.site/reader036/viewer/2022081412/544dbef6b1af9f4b068b4cb9/html5/thumbnails/7.jpg)
History of C++
Presentation by: Mendoza&Nazal
C++ was written by Bjarne Stroustrup at Bell Labs during 1983-1985. C++ is an extension of C. Prior to 1983, Bjarne Stroustrup added features to C and formed what he called "C with Classes". He had combined the Simula's use of classes and object-oriented features with the power and efficiency of C. The term C++ was first used in 1983.
![Page 8: C++ Programming Language](https://reader036.vdocuments.site/reader036/viewer/2022081412/544dbef6b1af9f4b068b4cb9/html5/thumbnails/8.jpg)
History of C++
Presentation by: Mendoza&Nazal
C++ was designed for the UNIX (operating system that originated at Bell Labs in 1969)system environment.
![Page 9: C++ Programming Language](https://reader036.vdocuments.site/reader036/viewer/2022081412/544dbef6b1af9f4b068b4cb9/html5/thumbnails/9.jpg)
History of C++
Presentation by: Mendoza&Nazal
Prior to C++, C was a programming language developed at Bell Labs circa 1969-1973. The UNIX operating system was also being developed at Bell Labs at the same time. C was originally developed for and implemented on the UNIX operating system.
![Page 10: C++ Programming Language](https://reader036.vdocuments.site/reader036/viewer/2022081412/544dbef6b1af9f4b068b4cb9/html5/thumbnails/10.jpg)
History of C++
Presentation by: Mendoza&Nazal
Dennis Ritchie restructured the language and rewrote the compiler and gave his new language the name "C" in 1972.
![Page 11: C++ Programming Language](https://reader036.vdocuments.site/reader036/viewer/2022081412/544dbef6b1af9f4b068b4cb9/html5/thumbnails/11.jpg)
History of C++
Presentation by: Mendoza&Nazal
C++ programming language was initially created by Bjarne Stroustrup, as a "better C". C++ was an attempt to extend and (to some extent) change the C programming language to overcome some of the common and big problems with the language. C++ was first standardized in 1998, and as such, is a much younger language than C.
![Page 12: C++ Programming Language](https://reader036.vdocuments.site/reader036/viewer/2022081412/544dbef6b1af9f4b068b4cb9/html5/thumbnails/12.jpg)
Data types
Presentation by: Mendoza&Nazal
![Page 13: C++ Programming Language](https://reader036.vdocuments.site/reader036/viewer/2022081412/544dbef6b1af9f4b068b4cb9/html5/thumbnails/13.jpg)
Data types
Presentation by: Mendoza&Nazal
CharSmall intIntLong intBoolFloatDoubleLong doubleWchar_t
![Page 14: C++ Programming Language](https://reader036.vdocuments.site/reader036/viewer/2022081412/544dbef6b1af9f4b068b4cb9/html5/thumbnails/14.jpg)
Structure of a Program in C++
Presentation by: Mendoza&Nazal
![Page 15: C++ Programming Language](https://reader036.vdocuments.site/reader036/viewer/2022081412/544dbef6b1af9f4b068b4cb9/html5/thumbnails/15.jpg)
Structure of a Program in C++
Presentation by: Mendoza&Nazal
The programmer can use them to include short explanations or observations within the source code itself. In this case, the line is a brief description of what our program is.
//
![Page 16: C++ Programming Language](https://reader036.vdocuments.site/reader036/viewer/2022081412/544dbef6b1af9f4b068b4cb9/html5/thumbnails/16.jpg)
Structure of a Program in C++
Presentation by: Mendoza&Nazal
Lines beginning with a hash sign (#) are directives for the pre-processor. They are not regular code lines with expressions but indications for the compiler's pre-processor. This specific file (iostream) includes the declarations of the basic standard input-output C++,
#include <iostream>
![Page 17: C++ Programming Language](https://reader036.vdocuments.site/reader036/viewer/2022081412/544dbef6b1af9f4b068b4cb9/html5/thumbnails/17.jpg)
Structure of a Program in C++
Presentation by: Mendoza&Nazal
Corresponds to the beginning of the definition of the main function. The main function is the point by where all C++ programs start their execution, independently of its location within the source code.
int main ()
![Page 18: C++ Programming Language](https://reader036.vdocuments.site/reader036/viewer/2022081412/544dbef6b1af9f4b068b4cb9/html5/thumbnails/18.jpg)
Structure of a Program in C++
Presentation by: Mendoza&Nazal
() is a function declaration: In C++, what differentiates a function declaration from other types of expressions are these parentheses that follow its name. Optionally, these parentheses may enclose a list of parameters within them.
int main ()
![Page 19: C++ Programming Language](https://reader036.vdocuments.site/reader036/viewer/2022081412/544dbef6b1af9f4b068b4cb9/html5/thumbnails/19.jpg)
Structure of a Program in C++
Presentation by: Mendoza&Nazal
Is the name of the standard output stream in C++, and the meaning of the entire statement is to insert a sequence of characters into the standard output stream
cout <<
![Page 20: C++ Programming Language](https://reader036.vdocuments.site/reader036/viewer/2022081412/544dbef6b1af9f4b068b4cb9/html5/thumbnails/20.jpg)
Structure of a Program in C++
Presentation by: Mendoza&Nazal
This character is used to mark the end of the statement and in fact it must be included at the end of all expression statements in all C++ programs
;
![Page 21: C++ Programming Language](https://reader036.vdocuments.site/reader036/viewer/2022081412/544dbef6b1af9f4b068b4cb9/html5/thumbnails/21.jpg)
Structure of a Program in C++
Presentation by: Mendoza&Nazal
The return statement causes the main function to finish. This is the most usual way to end a C++ console program.
return 0;
![Page 22: C++ Programming Language](https://reader036.vdocuments.site/reader036/viewer/2022081412/544dbef6b1af9f4b068b4cb9/html5/thumbnails/22.jpg)
Example Program in C++
Presentation by: Mendoza&Nazal
Welcome to the wonderful world of C++!!!
#include <iostream>
int main(){
cout << "Welcome to the wonderful world of C++!!!";
return 0;}
![Page 23: C++ Programming Language](https://reader036.vdocuments.site/reader036/viewer/2022081412/544dbef6b1af9f4b068b4cb9/html5/thumbnails/23.jpg)
Presentation by: Mendoza&Nazal