You are here

Solutions to Exercises in Chapter 4

5 February, 2015 - 16:29

Solution to Exercise 4.6.1

Answers:

  1. 3
  2. 0
  3. 3.5 because one of the operands is a floating-point value, it is not integer division

Solution to Exercise 4.6.2

Answers:

  1. 2
  2. 5
  3. "error" because most compilers require both operands to be of the integer data type

Solutions to Practice 4: Often Used Data Types

Solution to Exercise 4.7.1

Answers:

  1. false
  2. false
  3. true
  4. true
  5. false