What is C++
C++ is a computer language used in programming. C++ is an object oriented programming language created by BJarne Stroustrup in 1983. Object oriented programming language is the one in which main importance is given to the data of the program rather than the procedure and follows bottom up approach. C++ is an extension of C programming and the programs written in C language can run in C++ compilers. C++ also uses the concept of classes which focuses on the data.
C++ has been used by thousands of programmers to create computer software and is considered as one of the popular programming languages. It is used to create general systems software, drivers for various computer devices, software for servers and software for specific applications and also widely used in the creation of video games.
C++ implements data abstraction using classes. It also means data hiding i.e. showing only the essential parts which are required and hiding the other part i.e. the unnecessary part. Parts of the C++ program are easily reusable and extensible and the existing code is easily modifiable without actually having to change the code. C++ also has a concept called operator overloading which was not present in the earlier Object Oriented Programming Languages and hence makes the creation of libraries much cleaner and easier to use.
The C++ has different tokens (smallest individual entity):
Keywords Identifiers Variables Constants Punctuators Operators
Some of the features of C++ allow low level access to memory but also contain high level features. Initial use of C++ was limited to the United States and Europe. But now many developers and programmers around the world have adopted C++. Corrections and fine-tuning have resulted in a highly usable programming language that is a standard among computer users and programmers.
Structure of a C++ program consists of the following section:
Documentation section Link Section or Pre-processor Compiler directive section Main function section Global declaration section Variable declaration section Sub program section
The link section and the main function section are compulsory parts of a C++ program as the Link section is the set of instruction to the compiler and tells the compiler to include the required files from the system library before compiling the program and the main function section is the driver function of the program and if it is not present in the program, no program will execute.