Simple
It is a simple language in the sense that programs can be broken down into logical units and parts, has rich library support and has a variety of data types. Also, the Auto Keyword of C++ makes life easier.
Auto Keyword
The idea of the auto keyword was to form the C++ compiler to deduce the data type while compiling instead of making you declare the data type every freaking time. Do keep in mind that you cannot declare something without an initializer. There must be some way for the compiler to deduce your type.
Example:
C++
// C++ program to demonstrate // working of auto keyword #include <bits/stdc++.h> using namespace std; // Driver Code int main() { // Variables auto an_int = 26; auto a_bool = false ; auto a_float = 26.24; auto ptr = &a_float; // Print typeid cout << typeid (a_bool).name() << "\n" ; cout << typeid (an_int).name() << "\n" ; return 0; } |
b i
Features of C++
C++ is a general-purpose programming language that was developed as an enhancement of the C language to include an object-oriented paradigm. It is an imperative and compiled language. C++ has a number of features, including:
- Object-Oriented Programming
- Machine Independent
- Simple
- High-Level Language
- Popular
- Case-sensitive
- Compiler Based
- Dynamic Memory Allocation
- Memory Management
- Multi-threading