Operators in C

Expression and Operators

  • The symbols which are used to perform logical and mathematical operations in a C program are called C operators.
  • These C operators join individual constants and variables to form expressions.
  • Operators, functions, constants and variables are combined together to form expressions.
  • Consider the expression A + B * 5.
  • Where, +, * are operators, A, B are variables, 5 is constant and A + B * 5 is an expression.

Types of C operators

C language offers many types of operators.

  • Arithmetic operators.
  • Assignment operators.
  • Relational operators.
  • Logical operators.
  • Bit wise operators.
  • Conditional operators (ternary operators).
  • Increment/decrement operators.
  • Special operators.