C Operators

Arithmetic Operators

  • +, -, *, /, %
Loading...
Output:

Assignment Operators

Assign or update values. Common in loops and arithmetic sequences.

Loading...
Output:

Comparison Operators

Used to compare values, returning 1 (true) or 0 (false).

  • ==, !=, >, <, >=, <=
Loading...
Output:

Logical Operators

  • && – AND
  • || – OR
  • ! – NOT
Loading...
Output:

Bitwise Operators

Operate on bits rather than whole numbers.

  • &, |, ^, ~, <<, >>
Loading...
Output:

Operator Precedence

Determines the order in which operations are evaluated. Use parentheses to override precedence.

Loading...
Output:

Practice Question

What will this print?

A. 0
B. 1
C. error
Loading...
Output:

Need Help?

Ask the AI if you need help understanding or want to dive deeper in any topic