Section 2.24 Expressions-WE8-P1
Subgoals for evaluating an assignment statement.
-
Determine resultant data type of expression
-
Update variable for pre operators based on side effect
-
Solve arithmetic equation, operator precedence
-
Is the Left Hand Side (LHS) of the assignment statement a variable? Check the data type of the value on right hand side (RHS) against data type of LHS variable.
-
Update variable for post operators based on side effect
Subsection 2.24.1
Given
int x = 4, y = 6;
boolean result;
What is the value of
result
after each of the following?
Exercises Exercises
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
You have attempted 1 of 3 activities on this page.