| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Thanks!!In Reply To:Re:Request Admin's Further Clarification... Posted by:frkstyc at 2009-05-21 00:43:56 > Don't overread the FAQ. It says nothing whatsoever about scanf.
>
> I would love to explain a bit just to settle your concern. printf does not
> need to distinguish float's and double's as scanf does. According to what
> the C language standard terms "default argument promotion", any float
> matching against an ellipsis ("...") is implicitly promoted to double. So
> whether you pass a float or double to printf, it will always see a double.
> Therefore, it does not need a long modifier to distinguish the two types.
>
May I ask a follow-up question:
So %lf in printf is somehow a "mis-implementation" in old compilers?
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator