Re: printf *%f

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ref: http://www.cplusplus.com/reference/clibrary/cstdio/printf/

On Wed, Jan 12, 2011 at 3:23 PM, Aniruddha Bhattacharyya
<aniruddha.aot@xxxxxxxxx> wrote:
> Use "%.*f" for Float    (its ".*" not "*")
> and "%*d" for int
>
> On Wed, Jan 12, 2011 at 3:22 PM, Aniruddha Bhattacharyya
> <aniruddha.aot@xxxxxxxxx> wrote:
>>
>>
>> Use "%.*f" for Float    (its ".*" not "*")
>> and "%*d" for int
>>
>> Ref: http://www.cplusplus.com/reference/clibrary/cstdio/printf/
>>
>> On Wed, Jan 12, 2011 at 2:44 PM, ratheesh k <ratheesh.ksz@xxxxxxxxx> wrote:
>>>
>>> On Wed, Jan 12, 2011 at 2:32 PM, Bert Wesarg <bert.wesarg@xxxxxxxxxxxxxx> wrote:
>>> > On Wed, Jan 12, 2011 at 09:59, Fei Zhao <skywalkzf@xxxxxxxxx> wrote:
>>> >> I mean's that when to use printf("%*.*f" , 4, 2 , x) ; in linux kernel or
>>> >> our practical use?
>>>
>>> If you want to control the format dynamically.
>>> scanf("%d" , &first);
>>> scanf("%d" , %second);
>>> printf("%*.*f", first ,second , x);
>>>
>>> > I don't know when you want to use such calls, how should I? And what
>>> > has the linux kernel to do with this, this doesn't came up before, and
>>> > what is '*our* practical use'?
>>> >
>>> > Bert
>>> > --
>>> > To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
>>> > the body of a message to majordomo@xxxxxxxxxxxxxxx
>>> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>> >
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
>>> the body of a message to majordomo@xxxxxxxxxxxxxxx
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Assembler]     [Git]     [Kernel List]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [C Programming]     [Yosemite Campsites]     [Yosemite News]     [GCC Help]

  Powered by Linux