Operators

Last Updated: Jan 2026


Operators are special symbols that perform actions on values or variables.

Example: 5 + 3 — here + adds two numbers.


🧭 Types of Operators

CategoryOperatorsPurpose
Arithmetic+, -, *, /, % Basic math operations
Assignment & Compound=, +=, -=, *=, /=, %=, &=, |=, ^=, <<=, >>=Store or update variable values
Comparison==, !=, >, <, >=, <=Compare two values (true(1)/false(0))
Logical&&, ||, !Combine or invert boolean conditions
Bitwise&, |, ^, ~, <<, >>, >>>Work on bits of numbers
Unary++, --Increment/Decrement
Ternary (Conditional)?:Short form of if...else
Special Operatorssizeof, & *Memory related

✏ Mini Example

int a = 7;
int b = 3;

printf("%d\n", a + b); // 10 (Arithmetic)
printf("%d\n", a > b); // (1))true (Comparison)
printf("%d\n", a > 5 && b < 5); // (1) true (Logical)

💡 Don't worry! We'll explore each of these in full detail in the next sections.


Liked This Tutorial

Scan QR Code To Leave A Review Or

Click Here To Leave A Review
Scan QR