Machine Independent

A C++ executable is not platform-independent (compiled programs on Linux won’t run on Windows), however, they are machine-independent. Let us understand this feature of C++ with the help of an example. Suppose you have written a piece of code that can run on Linux/Windows/Mac OSx which makes the C++ Machine Independent but the executable file of the C++ cannot run on different operating systems.

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

Similar Reads

1. Object-Oriented Programming

C++ is an Object-Oriented Programming Language, unlike C which is a procedural programming language. This is the most important feature of C++. It can create/destroy objects while programming. Also, It can create blueprints with which objects can be created. We have discussed the Object-Orient Programming Concepts in C++ in this article....

2. Machine Independent

A C++ executable is not platform-independent (compiled programs on Linux won’t run on Windows), however, they are machine-independent. Let us understand this feature of C++ with the help of an example. Suppose you have written a piece of code that can run on Linux/Windows/Mac OSx which makes the C++ Machine Independent but the executable file of the C++ cannot run on different operating systems....

3. 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....

4. High-Level Language

...

5. Popular

C++ is a High-Level Language, unlike C which is a Mid-Level Programming Language. It makes life easier to work in C++ as it is a high-level language it is closely associated with the human-comprehensible English language....

6. Case-sensitive

C++ can be the base language for many other programming languages that supports the feature of object-oriented programming. Bjarne Stroustrup found Simula 67, the first object-oriented language ever, lacking simulations, and decided to develop C++....

7. Compiler Based

It is clear that C++ is a case-sensitive programming language. For example, cin is used to take input from the input stream. But if the “Cin” won’t work. Other languages like HTML and MySQL are not case-sensitive languages....

8. Dynamic Memory Allocation

C++ is a compiler-based language, unlike Python. That is C++ programs used to be compiled and their executable file is used to run them. C++ is a relatively faster language than Java and Python....

9. Memory Management

When the program executes in C++ then the variables are allocated the dynamical heap space. Inside the functions, the variables are allocated in the stack space. Many times, We are not aware in advance how much memory is needed to store particular information in a defined variable and the size of required memory can be determined at run time....

10. Multi-threading

C++ allows us to allocate the memory of a variable or an array in run time. This is known as Dynamic Memory Allocation. In other programming languages such as Java and Python, the compiler automatically manages the memories allocated to variables. But this is not the case in C++. In C++, the memory must be de-allocated dynamically allocated memory manually after it is of no use. The allocation and deallocation of the memory can be done using the new and delete operators respectively....