C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises both high-level and low-level language features.Developed by Bjarne Stroustrup starting in 1979 at Bell Labs, C++ was originally named C with Classes, adding object oriented features, such as classes, and other enhancements to the C programming language. The language was renamed C++ in 1983, as a pun involving the increment operator.

C++ is one of the most popular programming languages and is implemented on a wide variety of hardware and operating system platforms. As an efficient compiler to native code, its application domains include systems software, application software, device drivers, embedded software, high-performance server and client applications, and entertainment software such as video games.Several groups provide both free and proprietary C++ compiler software, including the GNU Project, LLVM, Microsoft, Intel and Embarcadero Technologies.

Language features:

  • Objects
  • Class
  • Inheritance
  • Polymorphism
  • Encapsulation
  • Dynamic Binding
  • Operator Overloading
  • Virtual member functions

Memory management:

C++ supports four types of memory management:

  • Static memory allocation:
  • A static variable is assigned a value at compile-time, and allocated storage in a fixed location along with the executable code. These are declared with the “static” keyword (in the sense of static storage, not in the sense of declaring a class variable).

  • Automatic memory allocation.:
  • An automatic variable is simply declared with its class name, and storage is allocated on the stack when the value is assigned. The constructor is called when the declaration is executed, the destructor is called when the variable goes out of scope, and after the destructor the allocated memory is automatically freed.

  • Dynamic memory allocation:
  • Storage can be dynamically allocated on the heap using manual memory management – normally calls to new and delete (though old-style C calls such as malloc() and free() are still supported).
    With the use of a library, garbage collection is possible. The Boehm garbage collector is commonly used for this purpose.