Node:Expressions and values, Next:, Previous:The assignment operator, Up:Expressions and operators



Expressions and values

The most common operators in any language are basic arithmetic operators. In C, these include the following:


+
unary plus, example: +5
-
unary minus, example: -5
+
addition, example: 2 + 2
-
subtraction, example: 14 - 7
*
multiplication, example: 3 * 3
/
floating point division, example: 10.195 / 2.4
/
integer division div, example: 5 / 2
%
integer remainder mod, example: 24 % 7