In this tutorial, you'll study different operators in C programming with the assistance of examples.
An operator may be a symbol that operates on a worth or a variable. For example: + is an operator to perform addition.
C features a wide selection of operators to perform various operations.
1)C Arithmetic Operators
An arithmetic operator performs mathematical operations like addition, subtraction, multiplication, division etc on numerical values (constants and variables).
2)C Increment and Decrement Operators
C programming has two operators increment ++ and decrement -- to vary the worth of an operand (constant or variable) by 1.
Increment ++ increases the worth by 1 whereas decrement -- decreases the worth by 1. These two operators are unary operators, meaning they only operate one operand.
3)C Assignment Operators
An assignment operator is employed for assigning a worth to a variable. the foremost common assignment operator is =
4)C Relational Operators
A relational operator checks the connection between two operands. If the relation is true, it returns 1; if the relation is fake , it returns value 0.
Relational operators are utilized in deciding and loops.
5)C Logical Operators
An expression containing logical operator returns either 0 or 1 depending upon whether expression results true or false. Logical operators are commonly utilized in deciding in C programming.
)C Bitwise Operators
During computation, mathematical operations like: addition, subtraction, multiplication, division, etc are converted to bit-level which makes processing faster and saves power.
Bitwise operators are utilized in C programming to perform bit-level operations.
7)Other Operators
Comma Operator
Comma operators are wont to link related expressions together.
www.zeedup.com