Chapter 2
Chapter 2
Chapter 2
Introduction to Programming
Chapter 2
Syntax of C++
Introduction to Programming
Learning outcomes:
History of C++
What is an IDE?
Structure of c++ Program
Introduction to Programming
History of C language
The C programming language was designed by Dennies Ritchie in the early 1970’s at
Bell Laboratories.
The main reason to devised C was to overcome the limitations of B.
It was Derived from the language BCPL (Basic Combined Programming Language).
C was the evolution of B and BCPL.
It was originally intended for use in writing compilers for other languages.
What is C++?
• C++ is a general purpose, case-sensitive, high level programming
language that supports procedural and object-oriented programming.
Dev-C++
For example, let’s look at the implementation of the Hello World program:
#include <iostream>
using namespace std;
int main() {
cout << "Hello World!" << endl;
}
Introduction to Programming
1. Standard libraries section:
#include <iostream>
using namespace std;
Generally, a program includes various programming elements like built-in
functions, classes, keywords, constants, operators, etc. that are already defined in
the standard C++ library.
In order to use such pre-defined elements in a program, an appropriate header
must be included in the program.
Standard headers are specified in a program through the preprocessor directive
#include.
Introduction to Programming
1. Standard libraries section: (con….)
#include <iostream>
using namespace std;
Thank You
For Your Patience