Some basic concept of C++
Variables in c++:- Variable is like a container that stores data values. In c++ variables are int, float, char, string, double, and boolean.
int:-Store integer(without decimal).
float and double:- Both store floating point number(with decimal) .The main difference between float and double is the precision of a floating point value. Precision indicates how many digits can have after the decimal point. In the float variable, the precision point is six or seven. In the case of double the precision point is 15.
Declaring Variable:- we can declare the variable by writing the type of the variable and the variable name.
type variableName = assigning value.
Constant:-Suppose we declare a variable and we don't want to change this variable value throughout the program so we can use a constant variable.
const int x=24 //here x is 24
x=25 //showing an error.
C++ String:-String used in c++ is to store multiple characters. To use string we must add the additional header file #include<string>.
String Concatenation:- We can concatenate the two strings by addition(+).
string firstName="Abhi";
string secondName="Sharma";
string fullName=firstName + secondName;