An introduction to C++ programming language.
- C++ programming language is an extension of C programming language and it was developed by Bjarne Stroustrup at Bell Technolabs.
- C++ can be said to be an intermediate programming languages as it has a combination of both high level and low level language features.
- This language is statically typed, is free form, and is a compiled general purpose language.
- We can say that C++ is an object oriented programming language but it is not purely an object oriented language.
- Some features of C++ language like the Friend and Virtual, violate some of the most important OOPs features and hence C++ is unworthy of being called a complete Object oriented programming language.
- Its features like Friend and Virtual, violate some of the very important OOPS features, rendering this language unworthy of being called completely Object Oriented.
- In short C++ is a middle level language.
Advantages of C++ over C
- The major advantage of C++ over C is that C++ is an object oriented programming language whereas C is a procedural language.
- Apart from this major advantage, there are many features of C++ which gives it an upper hand over C language.
Some features that give C++ an upper hand over C
- Type Checking is stronger in C++ as compared to C.
- C++ supports concepts like abstraction, encapsulation, inheritance etc and this makes it worthy and useful for programmers.
- C++ supports overloading operators and functions which is not supported in C.
- There is exception handling in C++ which is not available in C language.
- The concept of Virtual functions, constructors and destructors is available in C++ and not in C.
- There is the concept of inline functions in C++ instead of Macros that is used in C language.
- Inline functions function much like Macros but are much safer compared to Macros.
- One can declare variables anywhere in C++ program unlike C which requires to define variable only in the beginning.
If you feel there should be any correction anywhere, then kindly mention the same in the comments section below.