The correct output of the below code block is | Scala Question 2

16. The correct output of the below code block is -

object MyClass {
    def main(args: Array[String]) {
        var a : Float = 454.32138988f
        var b : Double = a;
        
        printf("a = " + a + "\t b = " + b)
    }
}
  1. a = 454.32138988 b = 454.32138988152344
  2. a = 454.32138 b = 454.3213806152344
  3. a = 454.32138 b = 454.32138
  4. error

Answer: A) a = 454.32138988 b = 454.32138988152344

Comments and Discussions!

Load comments ↻






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