Programming in C++ booklet today

What is C++?

C++ is general-purpose object-oriented programming (OOP) language developed by Bjarne Stroustrup.

Initially, C++ was designated “C with classes,” as it had all the properties of the C language with the expansion of client characterized information types called “classes.” It was renamed C++ in 1983.

It tends to be utilized to create working frameworks, programs, games, etc. C++ bolsters various methods of programming like procedural, object-situated, utilitarian, etc. This makes C++ incredible just as adaptable.

 

Why Use C++?

it’s the features of imperative, object-oriented also as generic programming models. C++ also has some additional facilities to those in C like classes, inheritance, default function argument, etc.

C++ plays quite integral role in times as many contemporary systems like operating systems, web browsers, databases, etc. have C++ code in a minimum of some a part of their code base. Moreover, C++ is sort of useful in performance critical areas due to its speed.

1.  C++ Popularity and High Salary

C++ is one among the foremost popular languages within the world. it’s employed by some 4.4 million developers worldwide. Also, C++ Developers are quite wanted and that they hold a number of the foremost high-paying jobs within the industry with a mean base pay of $103, 035 per annum .

2.  C++ has Abundant Library Support

C++ has the quality Template Library(STL) that’s very useful because it helps in writing code compactly and quickly as needed . It contains mainly four components i.e. algorithms, containers, functions, and iterators.

The algorithms are of various types like sorting, searching, etc. The containers store classes to implement different data structures that are commonly used like stacks, queues, hash tables, vectors, sets, lists, maps, etc.

The functors allow the working of the associated function to be customized with the assistance of the parameters passed. Also, the iterators are used for working upon a sequence of values.

3.  C++ features a Large Community

There is an outsized online community of C++ users and experts that’s particularly helpful just in case any support is required. There are tons of resources like GeeksforGeeks etc. available on the web regarding C++. a number of the opposite online resources for C++ include Stack Overflow, preference, Standard C++, etc.

4.  C++ In Databases

There are many modern-day databases like MySQL, MongoDB, MySQL, etc. that are written in C++. this is often because C++ is sort of modern and it supports features like exceptions, lambda expressions, etc. Many of the databases that are written in C++ are utilized in most of the in-use applications like YouTube, WordPress, Twitter, Facebook, etc.

5.  C++ In Operating Systems

All the main operating systems like Windows, Linux, Android, Ubuntu, iOS, etc. are written during a combination of C and C++. The Windows applications are written in C++, while Android applications are written in Java along side C/C++ with non-default run-times for C++ support. Also, C++ are often wont to develop the core of the applications in iOS.

In general, C or C++ are utilized in operating systems due to the speed and strongly typed nature of those languages.

6.  C++ In Compilers

C++ is closer to the hardware level and may be a comparatively low-level language. due to this reason, it’s utilized in many compilers as a back end programming language . An example of this is often the GNU Compiler Collection (GCC) which is currently written mostly in C++ along side C.

7.  C++ In Web Browsers

A lot of web browsers are developed using C++ like Chrome, Firefox, Safari, etc. Chrome contains C++ within the rendering engine, JavaScript engine, and therefore the UI. Firefox uses mainly within the rendering engine and a touch within the UI. Safari also uses C++ within the rendering engine and JavaScript engine.

8.  C++ In Graphics

Applications requiring graphics like digital image processing, computer vision, screen recording programs, etc. use C++ thanks to its high speed. this will also include different games that have graphics as an enormous a part of their structure.

9.  C++ In Embedded Systems

C++ is closer to the hardware level then it’s quite useful in embedded systems because the software and hardware in these are closely coupled. There are many embedded systems that use C++ like smart watches, MP3 players, GPS systems, etc.

10.  C++ is Portable

Programs developed in C++ are often moved from one platform to a different . this is often one among the most reasons that applications requiring multi-platform or multi-device development often use C++.

 

Basic C++ Hello World Program

/ Hello World C++ Program

#include <iostream>

int main() {

    std::cout << “Hello World!”;

    return 0;

}

 

Advantages of C++

1.  Object oriented

2.  Portable language (writing a program regardless of OS also as Hardware)

3.  Low-level language like programming language on Machine language called portable.

4.  C++ use multi-paradigm programming. The Paradigm means the design of programming .paradigm concerned about logics, structure, and procedure of the

5.  program. C++ is multi-paradigm means it follows three paradigm Generic, Imperative, Object Oriented.

6.  It is useful for the low-level programing language and really efficient for general purpose.

7.  C++ provide performance and memory efficiency.

8.  It provides a high-level abstraction.

9.  In the language of the matter domain.

10. C++ is compatible with C.

11. C++ used reusability of code.

12. C++ used inheritance, polymorphism.

13. Portability

14. Portability allows developing program regardless of hardware

15. It allows moving the program development for one platform to a different platform

16. C compatible (COMP): Programs developed in ‘C’ language are often moved with none modifications into C++

17. C++ is an object oriented embedded language which has the characteristics of low-level language & which is additionally developing the embedded software.

18. Which language having low-level features

Disadvantages of C++

*  It has no security

*  Complex during a very large high-level program.

*  Used for platform specific application commonly.

*  For a specific OS or platform, the library set has usually chosen that locks.

*  When C++ used for web applications complex and difficult to debug.

*  C++ can’t support garbage pickup .

*  C++ isn’t secure because it’s a pointer, friend function, and global variable.

*  No support for threads inbuilt .

Share