+ 1
I'm not understanding about "float" in C programming. And difference of between %d,%f .
6 odpowiedzi
+ 4
float refer to data type used in C to store floating point numbers.
The format parameter %d its used for treat relative parameter like an int, while %f like a float ex.
printf("%d %f", 10, 50.65f);
+ 2
but sometimes "%5.6f" what does it mean ?
+ 2
It mean "print the floating number using least 5 digits and least 6 decimals"
See here
http://www.cplusplus.com/reference/cstdio/printf/
+ 2
thank you 😄
+ 2
👍👍👍
+ 1
Okay.. by %d can i print any normal number? and %f is for point number. right?