Re: understanding format specifiers
- From: Mark McIntyre <markmcintyre@xxxxxxxxxxx>
- Date: Tue, 30 Aug 2005 16:16:18 +0100
On 30 Aug 2005 05:35:14 -0700, in comp.lang.c , "siliconwafer"
<spdandavate@xxxxxxxxx> wrote:
>Hi All,
>What does a 'format specifier' do?
tells printf how to format the output......
>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
No, it simply prints it using hex format. Bear in mind that its
exceptionally unlikely that 43 was stored in decimal in the first
place!
>Is it true for all format specifier?
All format specifiers tell printf what format to use, yes....
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
.
- References:
- understanding format specifiers
- From: siliconwafer
- understanding format specifiers
- Prev by Date: Re: low-level question
- Next by Date: Re: while (1) vs. for ( ;; )
- Previous by thread: Re: understanding format specifiers
- Next by thread: Re: understanding format specifiers
- Index(es):
Relevant Pages
|