Format specifier %02x
I have a simple program :
#include <stdio.h>
int main()
{
        long i = 16843009;
        printf ("%02x \n" ,i);
}
I am using %02x format spefier to get 2 char output, However output I am
getting is :
1010101
while I am expecting it to be :01010101 .
 
No comments:
Post a Comment