+ 5
Confusing format specifiers
Can anyone explain in detail about %f format specifier in C and all it's variations, because it's confusing to me as I'm new to C. 1. if I write %5.2f ... does 5 matters here? 2. if I add negative sign %-5.2f does it make any change? and some more clarity if someone can give I'd be glad https://code.sololearn.com/c6IwgTBS8Ggt/?ref=app
3 ответов
+ 14
5 tells it that the number should take up at least 5 characters. The minus means left alignment. You can find some info on the following web site...
https://www.geeksforgeeks.org/format-specifiers-in-c/
+ 5
I never experimented with all this! Thanks for asking this question and thanks Modi for answering
+ 3
Modi Thank you very much for the clear clarification and resource link..😊🙏