Tips & Tricks

What Is C++ language?

Introduction of C++ Language

C++ is a general-purpose object-oriented programming (OOP) language, developed by Bjarne Stroustrup, and is an extension of the C language. Initially, the language was called “C with classes” as it had all the properties of the C language with an additional concept of “classes.” However, it was renamed C++ in 1983.

C++ is a general-purpose programming language.
C++ is used to create computer programs. Anything from art applications, music players and even video games!

Your First C++ Program

A C++ program is a collection of commands or statements. Below is a simple code that has “Hello world!” as its output.

C++ offers various headers, each of which contains information needed for programs to work properly. This particular program calls for the header.

The number sign (#) at the beginning of a line targets the compiler’s pre-processor. In this case, #include tells the pre-processor to include the <iostream> header.
The <iostream> <iostream> header defines the standard stream objects that input and output data.

The C++ compiler ignores blank lines.

In general, blank lines serve to improve the code’s readability and structure.
Whitespace, such as spaces, tabs, and newlines, is also ignored, although it is used to enhance the program’s visual attractiveness.

In our code, the line using namespace std; tells the compiler to use the std (standard) namespace.
The std namespace includes features of the C++ Standard Library.


Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *