Casting and Ranges of Variables

AP Computer Science A· difficulty 3/5

What does <code>(int) -3.7</code> evaluate to?

  • A

    −3.7

  • B

    −4

  • C

    3

  • D

    −3

    check_circle

Explanation

Truncation toward zero: −3.7 → −3.

Want 10 more like this — adaptive to your weak spots?

Related questions