Computer Fundamentals and Programming Using Dev C++
Computer Fundamentals and Programming Using Dev C++
\t Tab
\\ Display backslash
Arithmetic Operators
Operator Operation Example Result
+ Addition 20 + 5 25
- Subtraction 20 – 5 15
* Multiplication 20 * 5 100
/ Division (Quotient) 20 / 5 4
+– Left to right
Comparison Relational
operators areOperators
used to evaluate whether
two numbers are equal, or if one is greater or less than
the other. It is sometimes denoted as relational
operators. The result of a relational operation is a
Boolean value that can only be true (1) or false (0),
according to its Boolean result.
X Y X || Y
True True True
True False True
False True True
False False False
Assignment Operator
The assignment operator assigns a value to a variable.
x = 20;
x = 2 + (y = 5);
is equivalent to:
y = 5;
x = 2 + y;