# C++ Inbuilt Operators

Discussion in 'C++' started by BiplabKamal, May 14, 2016.

1. ### BiplabKamalMember

Joined:
Dec 30, 2015
Messages:
37
7
Trophy Points:
8
Occupation:
Software Engineer
Location:
Kolkata
Basically computer programming is all about data and manipulation of data. The manipulation is called operation and operations are accomplished with the help of functions and operators. Like functions work with data, operators also work with data. The difference between functions and operators are that the operators are some special kind of functions with fixed special names matching with arithmetical and logical operator symbols like ‘+’, ‘-’,’*’ etc. Normal function names are identifiers and they cannot contain those symbols. Operator names and their meaning are predefined and the number of operands for each operator also fixed. For example addition operator + works on two variables and returns the addition result of the values of two variables. Also the operands of an operator have to be of same type. In built operators work on inbuilt data types only. You cannot create a new operator but for user defined data types you can extend the operators to support new types which we will discuss along with user defined data types in next chapters. In this chapter we will focus on the inbuilt operators in C++. Operators are classified in following groups-
Following tables will give full information about the operators:

### Arithmetic Operators

Arithmetic operators perform mathematical operations like addition, subtraction and multiplication

### Comparison Operators

Comparison operators check the relationship between two operands and returns true or false if the relationship is true or false respectively. Comparison operators are used in decision making

### Logical Operators

Logical operators are used in logical expressions. They are used in decision making

### Bit-wise Operators

Bit-wise operators are used to do bit level operations.

### Assignment Operators

Assignment operators are used to store the result of mathematical operation in one of the operand which is at left side of the operator.

### Conditional Operators

Conditional operator is a ternary operator which has three expressions as three operands. The first operand is a boolean expression depending on which either of the other two expression is executed.

### Special Operators

Last edited by a moderator: Jan 21, 2017
shabbir likes this.