Master the fundamental concepts of storage fundamentals through this focused micro-challenge.
Hex dumps line up address, sixteen data bytes in hex, and an ASCII column. xxd, GDB x/16xb, and forensic tools share the same format so engineers can spot magic numbers, UTF-8 text, and endianness at a glance.
Print offset (often zero for a single line), two hex digits per byte separated by spaces, then printable ASCII or . for non-printable bytes.
cLoading…
Keep the relevant documentation open while you implement. When your output disagrees with the reference, trace one failing case by hand before changing random lines.
You will read up to 16 characters and print one canonical hexdump line. This exercise requires correct hex encoding and the ASCII sidebar.
Print one line of a canonical hex dump, the format of hexdump -C and xxd-style tools, for up to 16 bytes of text.
The line has three parts:
00000000 (8 hex digits), then two spaces.| characters, with every byte that is not printable ASCII (isprint) shown as ..One line of up to 16 characters. The line break is not part of the data, and anything after the 16th character is ignored.
cLoading…
The hex area always has the same width, so the | column lines up whatever the length.
Three hints are available for this task, revealed one at a time inside the code workspace so you can struggle productively before seeing them.
Every task includes starter code, theory, and hidden tests so you can implement and verify locally in the browser.
How it works