C++ OPERATORS

Observe the following addition,
    a = 4
    b = 5
    tot = a + b
We are assigning values 4 and 5 to a and b. Next, we are doing addition, here while assigning we are using the equal to(=) symbol, and while adding we are using plus(+) symbol.
In programming language these equal to(=), plus(=) are the operators.
a and b which we are adding known as operands
the addition is known as operation.

+ is an operator
a, b are operands
a+b is an operation

Types of operators:
    1.Unary operators 
    2.Binary operators
    3.Ternary operator

  1.Unary operators :
     unary operators work on single operator
     there are two types of unary operators:
            Incremental operator
++
            Decremental operator --

      Again in both pre and post operations are there,

       pre-increment 

           operator before operand   ++a

       post-increment

           operator after operand   a++

       pre-decrement

           operator before operand   --a

       post-decrement

           operator after operand   a++

#include <iostream>
using namespace std;
int main()
{
    //printing Hello World!
    cout << "Hello World!"<<endl;
}

#include <iostream>
using namespace std;
int main()
{
    /*This is the 
    program to print
    Hello World*/
    cout << "Hello World!"<<endl;
}

#include <iostream>
using namespace std;
int main()
{
    //This is the 
    //program to print
    //Hello World
    cout << "Hello World!"<<endl;
}

 Contact Us:

          codecalculatenr@gmail.com