EmbLogic's Blog

issue in conversion specifier

%#d  %#o   %#x

what this # keyword do in this conversion

3 Responses to issue in conversion specifier

  1. hemant.kumar says:

    let i=100;
    pf(“%x\n”,i)=64 //hexadecimal number
    pf(“%#x\n”,i)=0*64
    pf(“%o\n”,i)=100 //octal number
    pf(“%#o\n”,i)=0100
    ‘#’ is used to represent number …for hexadecimal 0*64 and for octal 0100
    0*64 =its a hexadecimal number
    0100=octal number

  2. hemant.kumar says:

    and in case %#d
    pf(%d\n”,i)=100
    pf(%#d\n”,i)=100
    it means a integer number..

  3. ashish.dahiya says:

    thnx hemant ..

Leave a Reply to ashish.dahiya Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>