Section 2.13 Assessment: Operation Precedence
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
Exercises Exercises
- Yes
- Incorrect
- No
- Correct
2.
3.
4.
5.
int eta = 5;
int iota = (eta + 5) * (5 % eta + 2);
int zeta = eta + 5 * (5 % eta + 2);
You have attempted 1 of 2 activities on this page.