Introduction to c++

  

Introduction to c++

Hello! everyone I hope you all are doing great in this period. In the previous tutorials we have learned about c language, and we covered all important topics related to c language. Now we will learn c++ language and important topics related to c++.


SMART ENGINEERS


What is c++ ?

C++ is a general-purpose programming language that was developed as an enhancement of the C language to include object-oriented paradigm.it is an imperative and a compiled language.

Some of the features & key-points to note about the programming language are as follows:

Simple:- It is a simple language in the sense that programs can be broken down into logical units and parts, has a rich library support and a variety of data-types.

Machine Independent:- A C++ executable is not platform-independent (compiled programs on Linux won’t run on Windows), however they are machine independent.

Mid-level language:- It is a mid-level language as we can do both systems-programming (drivers, kernels, networking etc.) and build large-scale user applications (Media Players, Photoshop, Game Engines etc.)

Speed of execution:- C++ programs excel in execution speed. Since, it is a compiled language, And also hugely procedural. slow the execution of the program overall. Since there is no additional processing overhead like this in C++, it is blazing fast.

Pointer and direct Memory-Access:- C++ provides pointer support which aids users to directly manipulate storage address. This helps in doing low-level programming (where one might need to have explicit control on the storage of variables).

Compiled Language:- C++ is a compiled language, contributing to its speed.

Significance of C++:-

C++ finds varied usage in applications such as:

1.Operating Systems & Systems Programming. e.g Linux-based OS (Ubuntu etc.)

2.Browsers

3.Graphics & Game engines (Photoshop, Blender, Unreal-Engine)

4.Database Engines (MySQL, MongoDB, Redis etc.)

5.Cloud/Distributed Systems.

Some interesting facts about C++ language:-

1.C++ is one of the predominant languages for the development of all kind of technical and commercial software.

2.C++ introduces Object-Oriented Programming, not present in C. Like other things, C++ supports the four primary features of OOP: encapsulation, polymorphism, abstraction, and inheritance.

3.C++ got the OOP features from Simula67 Programming language.

4.A function is a minimum requirement for a C++ program to run.(at least main() function).

 

Why C++ over C language?

Following features of C++ makes it a stronger language than C

1.There is Stronger Type Checking in C++.

2.All the OOPS features in C++ like Abstraction, Encapsulation, Inheritance makes it more worthy and useful for programmers.

3.C++ supports and allows user defined operators (i.e. Operator Overloading) and function overloading is also supported in it.

4.Exception Handling is there in C++.

5.The Concept of Virtual functions and also Constructors and Destructors for Objects.

6.Inline Functions in C++ instead of Macros in C language. Inline functions make complete function body act like Macro, safely.

7.Variables can be declared anywhere in the program in C++, but must be declared before they are used.

Structure and syntax of c++

#include <iostream>

using namespace std;

int main()

{

  cout << "Hello smart engineers";

  return 0;

}


In the next tutorial we will learn more upcoming topic in c++, till then good bye, take care.

read my previous blog about array in C language click here........

 

 

Comments

Post a Comment

Popular posts from this blog

Decision making with if statement and else..if

Switch statement in C language

Call by value and by reference in function