C Programming
C Programming
Subtraction(-)
2
Subtracts the second operand from the first.
Multiplication(*)
3 Multiplies two operands
Division(/)
4
Divides the first operand by the second.
Modulus(%)
5 Returns the remainder of the division.
Logical Operators
02
Performs a bit-by-bit OR operation on
Bitwise OR (|) two operands.
03
Performs a bit-by-bit XOR operation
Bitwise XOR (^) on two operands.
05
Shifts the bits of an operand to the
Left Shift (<<) left.
06
Shifts the bits of an operand to the
Right Shift (>>) right.
Relational Operator
Operator Meaning Example
== Equal to 5 == 5
!= Not equal to 5 != 10
Assignment Operator
Compound Assignment
// if (condition){
// result = value1;
// } else {
result = value2;
// }
// Prefix
// var = var + 1 // var = var + 1 result = ++var
// result = var // result = var result = --var
3 + , - , ! , ~ , ++ , -- Right - to - Left
7 == , != Left - to - Right
9 `
10 = , += , -= , …. Right - to - Left
Conclusion
Operators are fundamental building blocks of C programming.
By understanding the different types of operators, you can
write powerful and efficient C programs.
Thank You
We appreciate your attention and hope this presentation
provided valuable insights of Operators in C programming.