Class 7: Operators, Precedence, Associativity Flashcards
L-value
The operant that can be found on the left side of the assignment operator
R-value
The expression that can be found on the right side of the assignment operator. R values can be constants, expression, bre a return value from a function etc
When using any C operator, the data type on the left side of the operators and the data type on the right side of the operator must be __________. Casting can be used if the data types do not match
Identical
If we do not cast the compiler will do if for us implicitly. However it is not what we often want and could cause bugs
TRUE
Precedence
The relationship between two operators in terms of the order in which the operations are performed
Mathematical symbols available
+, -, *, /, %
A = 4, c = 4, b = 3
Z = (a++ > c) || (++b <= a)
(4 > 4) || (4 < = 5)
Z = 1