ProgrammingVery hardProduct-company MCQ pattern

What is printed?

What is printed?
print(2 ** 63 - 1 == 9223372036854775807, (2 ** 63) % 10, -2 ** 63 // 10)
  1. A. True 8 -922337203685477580
  2. B. True 2 -922337203685477581
  3. C. True 8 -922337203685477581
  4. D. False 8 -922337203685477581

Correct answer: C. True 8 -922337203685477581

2**63 - 1 is the usual 64-bit signed maximum, and the comparison is exact. 2**63 ends in 8, and -2**63 // 10 floors -922337203685477580.8 to -922337203685477581.

More Python Programming questions

Exams that ask this topic