%p Format specifier in c

后端 未结 6 552
长情又很酷
长情又很酷 2020-12-15 08:12

How are the specifiers %p and %Fp working in the following code?

void main() 
{
    int i=85;

    printf(\"%p %Fp\",i,i);

    get         


        
6条回答
  •  [愿得一人]
    2020-12-15 08:30

    Addition to what @Myforwik said

    %p is for printing a pointer address.

    %Fp is probably used to format a FAR pointer which is of the form --> (0x1234:0x5678)

    and 85 in decimal is 55 in hexadecimal.

    I hope its okay now.

    References : http://www.lix.polytechnique.fr/~liberti/public/computing/prog/c/C/FUNCTIONS/format.html http://www.winehq.org/pipermail/wine-devel/2005-March/034390.html

提交回复
热议问题