What is C++ ?
C++ is a computer programming language that based on object oriented concepts like encapsulation,overloading,polymorphism etc. it was developed by Bjarne stroustrup at AT&T Bell Loboratories in early 1980's. because of it's object oriented feature programmer can build large programs with clarity , extensibility and easy to maintenance feature .
Features of C++ object orinted programming
- Data can not be accessed by external function means data is hidden from external function.
- Object communicate with each other through functions of class.
- New data and object can be easily added.
- Emphasis on data rather then procedure.
- Data encapsulation/Data binding
- Data hiding .
- Auto initialization through construction and clear object through destructors.
- Operator overloading
- Function overloading
- Exception handling
- Easily maintainable and expandable
Concepts used in C++
6) Dynamic binding
Simple Hello world program in C++
cout<<"Hello World program in C++.\n" ;
operater << is output operator that use to generate out put of program.
output of this program will be
Hello World program in C++.
C++ program execution begin with main() function so every program must have a main function.
every statment in c++ terminate with semicolons.
How to write comments in C++
C++ provides two way to write comments in program 1) used double slash 2) used C language comments symbol like /* for opening comments and */ for closing . example // this is comment line /* comments start hear comments ends */