nerdexam
GIAC

GPYC · Question #37

Review the following code. import struct a = "\x01\x00" struct.unpack("<H",a) What is the output?

The correct answer is C. (256,). You've hit your limit · resets 1pm (America/New_York)

File System & Data Management

Question

Review the following code. import struct a = "\x01\x00" struct.unpack("<H",a) What is the output?

Options

  • A(1,0)
  • B(1,)
  • C(256,)
  • D(\x01#\x00)

How the community answered

(38 responses)
  • A
    3% (1)
  • B
    3% (1)
  • C
    84% (32)
  • D
    11% (4)

Explanation

You've hit your limit · resets 1pm (America/New_York)

Topics

#struct module#little endian#binary unpacking#unsigned short

Community Discussion

No community discussion yet for this question.

Full GPYC Practice