4.C++ Programming Language
4.C++ Programming Language
• C++ is an Object Oriented Programming language developed by Bjarne Stroustrp at AT & T Bell
Laboratories, USA in the early 1980’s.
• C++ is nothing but C language extended or improved with the concept of Classes and Objects.
Hence every valid C program is also a C++ program.
• C++ is called as a superset of C programming language.
• The major design creation of C++ was to retain its compatibility with C programming language.
• All valid C programs are valid C++ program. Hence a C++ compiler can compile and execute all
valid C programs but reverse is not true.
• The C++ language uses most of the C language features like decision making statements, looping
statements, structure etc.
• Apart from supporting the keywords of C language, C++ also adds certain additional keywords
which help implementing object oriented paradigm.
Strict type checking means function prototype must be known for each function which is
called and the call function must match the function prototype.
The function prototype specify function name and number of arguments passed and the return
type ( if any) of the function.
Eg:
void max(int,int);
int max(int,int);
void max();
In C++, function prototyping is compulsory; if the function declaration is not placed before the
function call it will raise error where as in C programming language it is optional.
Eg: