< C Programming

Objective

  • Learn about the range of operators that C provides:
    • Unary Operators
    • Binary Operators
    • Mathematical Operaters
    • Logical Operators

Lesson

Unary operators

  • ++ – Pre-increment or post-increment operator. Increases a variable's value by 1.
  • -- – Pre-decrement or post-decrement operator. Decreases a variable's value by 1.
  • ! – Negation operator. Arithmetically or logically negates a variable.

Binary operators

  • + – Addition operator. Produces the sum of two variables.
  • - – Subtraction operator. Produces the difference of two variables.
  • * – Multiplication operator. Produces the product of two variables.
  • / – Division operator. Produces the quotient of two variables.
  • % – Modulus operator. Produces the remainder of the division of two variables.

Assignments

This article is issued from Wikiversity. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.