You are on page 1of 1

1.

Arithmetic Operators: These are used for performing mathematical operations on


numerical values. Examples include + (addition), - (subtraction), * (multiplication), /
(division), and % (modulus).
2. Assignment Operators: These are used for assigning values to variables. Examples
include = (simple assignment), += (add and assign), -= (subtract and assign), *= (multiply
and assign), and /= (divide and assign).
3. Comparison Operators: These are used for comparing values to determine whether they
are equal, greater than, or less than each other. Examples include == (equal to), != (not
equal to), > (greater than), < (less than), >= (greater than or equal to), and <= (less than or
equal to).
4. Logical Operators: These are used for combining conditions to create more complex
expressions. Examples include && (logical AND), || (logical OR), and ! (logical NOT).
5. Bitwise Operators: These are used for performing bitwise operations on integer values.
Examples include & (bitwise AND), | (bitwise OR), ^ (bitwise XOR), ~ (bitwise NOT),
<< (left shift), and >> (right shift).
6. Ternary Operator: This is a shorthand operator used for conditional expressions. It has
three parts: a condition, a value to return if the condition is true, and a value to return if
the condition is false. It is written in the form condition ? value_if_true : value_if_false.
7. Increment and Decrement Operators: These are used for incrementing or decrementing
the value of a variable by 1. Examples include ++ (increment), -- (decrement), ++x
(prefix increment), and x++ (postfix increment).
These are the most commonly used types of operators in C programming. Understanding
how to use them effectively is essential for writing efficient and effective code

You might also like