Printing Pointer Values

The output for %p conversion in the fprintf function (§4.9.6.1)

Microsoft C supports three types of pointer conversions: %p (a pointer), %lp (a 32-bit far pointer), and %hp (a 16-bit near pointer).

The fprintf function produces hexadecimal values of the form XXXX (an offset) for near pointers or XXXX:XXXX (a segment plus an offset, separated by a colon) for far pointers. The output for %p depends on the memory model in use.