Class 7: Operators, Precedence, Associativity Flashcards

1
Q

L-value

A

The operant that can be found on the left side of the assignment operator

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

R-value

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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

A

Identical

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Precedence

A

The relationship between two operators in terms of the order in which the operations are performed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Mathematical symbols available

A

+, -, *, /, %

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

A = 4, c = 4, b = 3
Z = (a++ > c) || (++b <= a)

A

(4 > 4) || (4 < = 5)
Z = 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly