C++ Tutorial - Learn C++ Programming Language in 10 minutes.

cpp programming

C++ is a general-purpose programming language based on C programming language. C++ was developed by Bjarne Stroustrup in 1979. This is the fundamental programming language which is used in every software you use in your daily life whether it is a game, tool or anything like that. There are also many other programming languages like python, java etc- but the most useful is the one about which we are discussing right now, the C++ programming language. Also, There are a lot of career options in the C++ programming language. So, Today I am gonna be giving you a basic C++ tutorial and I am pretty sure that you will be able to write a basic c++ program after learning it.

BASIC TERMS OF THE C++ PROGRAMMING LANGUAGE

1. HEADER FILE (#include<iostream.h>).

#include<iostream.h> is the header file of a program which is written in c++ programming language. Basically, it is the term which helps the compiler(The place where your program is being processed)to execute your program. The header file should be added in the first line of your program. In simple words, your program should start with a header file called #include<iostream.h>.

2. VOID MAIN (  ).

Void main is the area of a program from where your whole program should be controlled. Basically, It is the central processing unit of your program. Without creating void main, your program can't be run by the compiler.

3. CIN AND COUT.

Cin and Cout are the input and output operators of your c++ program. Basically, Cin is the input operator which is used to take the data from the user while Cout is the output operator which is used to give the output data or you can say the resultant data to the user. These operators are used in every c++ program.

4. keywords and identifiers.

Keywords are the words which are predefined in the memory of the compiler. Some of the examples are int, float, char, pow, sqrt etc- while on the other hand Identifiers are the words which are defined by the user in the memory of the compiler. Anything you want to initialize in the memory of the compiler accept the keywords is called Identifiers.

There are also some of the special symbols and characters which are essential in c++ programming. For example - <> {} () ; * / :: etc-

NOTE - This is a basic tutorial for beginners so that they could understand how it will work.

Q. Where you will write the c++ program and execute it?

There is a software called Turbo c++ for which you can write your c++ program and execute it. This software is completely free and available for windows as well as mac.

BASIC C++ PROGRAM

#include<iostream.h>
void main()
{
int a, b , total;
cin>>a>>b;
total=a+b;
cout<<"total"
}

step 1. Header File (#include<iostream.h>)
step 2. Create void main()
step 3. Initialize your variables (Identifiers)
step 4. Cin operator is used for taking data
step 5. calculation for total
step 6. Cout operator is used to giving the output data.

So, I hope you will understand how to write a basic c++ program in just a few minutes.

Post a Comment

0 Comments