- USER CORNER
- OVERVIEW | BASICS
- C DATA TYPES
- VARIABLES IN C
- CONSTANTS or LITERALS
- C OPERATORS & ENUMS
- DECISION MAKING
- LOOPING IN C
- CONTROL FLOW IN C
- C FUNCTIONS
- ARRAYS IN C
- POINTERS IN C
As studied earlier, Operators are the symbols, which performs operations on various data items known as operands. For Example: in a
b are operands and
+ is an operator.
Note:- To perform an operation, operators and operands are combined together forming an expression. For example, to perform an addition operation on operands a and b, the addition(+) operator is combined with the operands a and b forming an expression.
Arithmetic operators are used to perform arithmetic calculations.
They can work on any built-in data type of C except on boolean type.
C provides various arithmetic operators that are,
|+||Adds two operands.||A + B = 30|
|−||Subtracts second operand from the first.||A − B = -10|
|*||Multiplies both operands.||A * B = 200|
|/||Divides numerator by de-numerator.||B / A = 2|
|%||Modulus Operator and remainder of after an integer division.||B % A = 0|
|++||Increment operator increases the integer value by one.||A++ = 11|
|--||Decrement operator decreases the integer value by one.||A-- = 9|
Addition is: 10