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.
Read one line of text from stdin (up to 16 characters, letters/digits/punctuation).
Print the hex dump of its characters (excluding the trailing newline):
Input "DB" -> Output "44 42 |DB|"
Three hints are available for this task, revealed one at a time inside the code workspace so you can struggle productively before seeing them.
All starter code and reference implementations are available for your local setup.
View on Github