C Programs - Operators


Operators are the symbol which are used to perform mathematical, logical and other operations on the operands.

Types of operators in C language -

  • Arithmetic operators
    1. Addition +
    2. Subtraction -
    3. Multiplication *
    4. Division /
    5. Modulo %
    6. Increment ++
    7. Decrement --
  • Relational operators
    1. Equal ==
    2. Not equal !=
    3. Greater than >
    4. Less than <
    5. Greater than equal to >=
    6. Less than equal to <=
  • Logical operators
    1. Logical AND &&
    2. Logical OR ||
    3. Logical NOT !
  • Bitwise operators
    1. Bitwise AND &
    2. Bitwise OR |
    3. Bitwise exclusive OR ^
    4. Left shift <<
    5. Right shift >>
  • Assignment operators
    1. Assignment =
    2. Addition assignment +=
    3. Subtraction assignment -=
    4. Multiplication assignment *=
    5. Division assignment /=
    6. Remainder assignment %=
  • Conditional operators
    1. Ternary operator expression 1 ? expression 2 : expression 3
  • Special operators
    1. Size of operator sizeof

List of programs

  1. C program to find sum of two numbers
  2. C program to perform all arithmetic operations
  3. C program to find perimeter of a rectangle
  4. C program to find area of a rectangle
  5. C Program to find diameter, circumference and area of a circle
  6. C program to convert celsius to fahrenheit
  7. C program to convert fahrenheit to celsius
  8. C program to find power of a number
  9. C program to find square root of a number