Multiple choice technology programming languages

The following are data type conversions that would be performed when initializing variables. Which one may lose information in the conversion process?

    1. From an int to a long
    1. From a byte to an int
    1. From a short to a byte
    1. From an int to a double
  1. 5) All of the above

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

Widening conversions (int to long, byte to int, int to double) never lose information because the target type has equal or greater range. A short to byte conversion can lose information if the short value exceeds byte's range (-128 to 127). Since option C may lose data, 'all of the above' is correct.