Which is the correct order for explicit type conversion to convert a larger to a smaller type in C#?

27. Which is the correct order for explicit type conversion to convert a larger to a smaller type in C#?

  1. double -> float -> long -> int -> char -> bool
  2. double -> float -> long -> int -> char
  3. float -> double -> long -> int -> char
  4. float -> double -> long -> int -> char -> bool

Answer: B) double -> float -> long -> int -> char

Explanation:

The explicit type conversion is done in the following order: double -> float -> long -> int -> char.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.