ProgrammingVery hardJEE Main · CAT placement

What is printed?

What is printed?
print(int.from_bytes((65).to_bytes(1, 'big') * 3, 'big'), 65 * 65 * 65, bytes([65] * 3).decode())
  1. A. 4276545 274625 AAA
  2. B. 4276545 274625 AAB
  3. C. 4276546 274625 AAA
  4. D. 4276545 274626 AAA

Correct answer: A. 4276545 274625 AAA

Three bytes of 0x41 read big-endian give 0x414141, which is 4276545. 65 cubed is 274625, and the bytes decode to the string AAA.

More Python Programming questions

Exams that ask this topic