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

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

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

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

Explanation:

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


Comments and Discussions!

Load comments ↻






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