C Language
Operators
There are three types of operators used in every programming languages: Arithmetic Operators, Relational Operators, and Logical Operators.
Arithmetic Operators Arithmetic operators are the mathematical operations used in programming. The hierarchy of operators is important to a program, and this is the sequence to follow: Parenthesis ( ) Exponent ^(caret) Multiplication * Division / or % Addition + Subtraction - %(modulus division) - is simply division that is taking the remainder Relational Operators Relational operators are used in comparing one value to another. > greater than < less than >= greater than or equal to <= less than or equal to != or <> not equal to == equal to Logical Operators Logical Operators are used to evaluate the condition given in a program && (AND) || (OR) ! (NOT) Truth Table && || 1 1 = 1 1 1 = 1 1 0 = 0 1 0 = 1 0 1 = 0 0 1 = 1 0 0 = 0 0 0 = 0 |
|
Quick Links |