+ 2
What do we mean by 4.2f in C programming?
I know that f is float which is a data type. But what is 4.2f? Confused!
1 RĂ©ponse
+ 8
The format %4.2f means that you specify only to use 2 decimal digits. and 4 is the width (usually right-justified). If you have a number = 3.223, printing with %5.2f.
(from a site)