Do you know about %#x, in C language format string

Benjamin picture Benjamin · Aug 20, 2010 · Viewed 7.5k times · Source
KdPrint((
         "Unknown IoControlCode %#x\n",
                io_stack->Parameters.DeviceIoControl.IoControlCode
        ));

It's weird. What does sharp mean?

Answer

Joachim Sauer picture Joachim Sauer · Aug 20, 2010

# indcates an alternative format. For x this means that 0x is prepended to the output.