Some Interesting Facts About C++

Some Interesting Facts About C++

2 min read

C++ is a programming language that helps programmers write fast, portable programs.

1.) C++ provides rich library support in the form of Standard Template Library (STL) through which many functions are available that help in quickly writing code. For ex:- Several libraries for various containers like sets, maps, hash, tables, etc.

2.) The name of C++ signifies the evolutionary nature of the changes from C. ++ is the C increment operator.

3.)Memory Management :- C++ supports 4 types of memory management : static storage duration objects , thread storage duration objects , automatic storage duration objects and dynamic storage duration objects.

4.) C++ got the OOP features from Simula67 programming language.

5.) Purely Object Oriented ? – NO, not purely object oriented . We can write C++ code without using classes and it will compile without showing any error message .

6.) C and C++ invented at same place i.e., AT & T Bell Laboratories.

7.) Can write a code without” ; ” ? – Yes , you can write a program without semicolon .EX:-

#include<iostream>
int main()
     {
         if(std::cout<<"Hello World"){}
     }

8.) Static members do not have this pointer .

9.) comma(,) operator is used in 2 ways :- As a separator and as a operator .

10.) C++ has 2 main concepts :- It has 2 primary concepts – direct mapping for hardware features and zero-overhead abstractions for mapping .

11.) Many programming languages are influenced by C++ , Ex:- C# , Java etc.

12.) Friend Function enhances encapsulation if they used properly . Friend functions are very useful in operator overloading .

13.) Dynamic Memory Allocation :- In C++ , dynamic memory allocation is done through new and delete operators .

14.) There are 6 storage class specifiers in C++ :- auto, register, static, extern, typedef, mutable .

15.) The concept of inline function is borrowed from Ada programming language and “//” (single line comment) is borrowed from BCPL programming language .

THANK YOU

Choose your Reaction!
Leave a Comment