Operators in C
An operator is a symbol that tells the compiler to perform a specific operation on one or more operands (variables or values).Arithmetic Operators
Used to perform mathematical operations (assumea = 10, b = 3):
/ performs integer division when both operands are integers (drops the decimal). % gives the remainder of that division.
Assignment Operators
Assign values to variables. The right-hand side is evaluated first, then assigned to the left.Relational Operators
Compare two values. Result is1 (true) or 0 (false). Assume a = 10, b = 5:
Logical Operators
Combine multiple conditions:Bitwise Operators
Operate at the binary (bit) level:
Example: