← Quiz: COA Numericals: all 10 questions
Quiz: COA Numericals · Question 8 of 10
What does this print? (code)
What does this print?
import struct
print(hex(struct.unpack(">I", struct.pack(">f", -12.5))[0]))
- A.0x41480000
- B.0xc1480000
- C.0xc1280000
- D.0x41c80000
Answer & explanation
Correct answer: 0xc1480000
Only the sign bit changes from +12.5, so 0x41480000 becomes 0xc1480000.
Can you get the rest right without peeking?
Take the timed Quiz: COA Numericals quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →