C++ is immensely popular, particularly for applications that require speed and/or access to some low-level features. It extends C. Infact, at first, it was created as a set of extensions to the C programming language by Bjarne Stroustrup in 1979.
Let us look at the important terms and syntax before jumping into the internals of C++ programming.
C++ Operators specify what is to be done to objects with specific type. Operators act on expressions to form a new expression.
C++ is a typed language. That means, each variable is given a specific type which defines what values it can represent, how its data is stored in memory, and what operations can be performed on it.
A variable is a named location in memory. Variables are used to give a value a name so we can refer to it later.
The C++ language provides three types of decision statements: if-else, the conditional expression ?:, and the switch statement.
Iteration statements create loops in the program. In other words, it repeats the set of statements until the condition for termination is met. Iteration statements in C++ are for, while and do-while.
A structure is a group of heterogeneous data elements grouped together under one name. These data elements are called members and they can have different types and different lengths.
A function in C++ is a module of code that takes parameters in , does some computation, and returns a new piece of information based on the parameter information. Functions present a higher level of abstraction and facilitate a divide-and-conquer strategy for program decomposition.
In C++, the functions are said to be overloaded if two or more functions share the same name differs in their parameter declarations and the process is referred to as function overloading.