codegurukool.com · Free coding tutorials & online compiler

Home › C Tutorial › C operators

C operators

Arithmetic, comparison, logic.

Arithmetic + - * / %, assignment += -=, comparison == != < >, logic && || !, and ++ / --.

Example code

#include <stdio.h>
int main() {
  int x = 10;
  x += 5; x++;
  printf("%d %d %d\n", x, x % 4, x > 10 && x < 20);
  return 0;
}

Run this code in the online editor

← C constantsC booleans →