ProgrammingVery hardJEE Advanced · CAT placement

What is printed?

What is printed?
print(int(1e23))
  1. A. 99999999999999991611392
  2. B. 100000000000000000000000
  3. C. 99999999999999990000000
  4. D. 1e+23

Correct answer: A. 99999999999999991611392

The literal 1e23 is a float, and the nearest double is 99999999999999991611392, not exactly 10**23. int() of a float gives that exact stored value.

More Python Programming questions

Exams that ask this topic