Re: understanding format specifiers



Hi,

Yes they do automatic conversion for you :)

and if the result cannot be accomodated in the target the results are
un-defined :(

- Ravi

> Hi All,
> What does a 'format specifier' do?
> Suppose I do,
> int a = 43;  //decimal number
> printf("%x",a);
> I will get hex equivalent of 43.
> Does the format specifier do an implicit "decimal to hex" conversion
> before displaying ?
> Is it true for all format specifier?
> -Siliconwafer
>

.



Relevant Pages

  • understanding format specifiers
    ... I will get hex equivalent of 43. ... Does the format specifier do an implicit "decimal to hex" conversion ... before displaying? ...
    (comp.lang.c)
  • Re: understanding format specifiers
    ... > I will get hex equivalent of 43. ... > Does the format specifier do an implicit "decimal to hex" conversion ... It does an explicit conversion from ...
    (comp.lang.c)