You are here

Solutions to Exercises in Chapter 14.

10 February, 2015 - 12:00

Solution to Exercise 14.1.1

Answers:

  1. true
  2. y is: 18 and z is: 19
  3. x is: 8.77 and y is: 8 Note: truncation of 8.77 to 8 upon demotion.
  4. Not ok. Error, the item incremented must have Lvalue attributes, usually a variable. It is an expression not a variable.

Solutions to Practice 1.: Test Before Loops

Solution to Exercise 14.3.1

Answers:

  1. true
  2. y is: 27 and z is: 26
  3. x is: 3.44 and y is: 3 Note: truncation of 3.44 to 3 upon demotion to integer data type.
  4. Not ok. Error, the item incremented must have Lvalue attributes, usually a variable. Because of the parentheses, it is an expression not a variable.