devmingle
Home
Categories
Popular Codes
Articles
/
C
/
Float
Float
I want to print a float value which has 2 integer digits and 6 decimal digits after the comma. If I just use printf("%f", myFloat) I'm getting a truncated value. I don't know if this always happens in C, or it's just because I'm using C for microcontrollers (CCS to be exact), but at the reference it tells that %f get just that: a truncated float. If my float is 44.556677, I'm printing out "44.55", only the first two decimal digits.
0
Share
Similar codes
7 votes
201 views
6 answers
Reverse string in c
C
0 vote
199 views
1 answer
Form controls in bootsrap
C
1 vote
204 views
1 answer
Adb switch to usb
C
1 vote
316 views
1 answer
C check if char is an operator
C
0 vote
203 views
1 answer
Molotovn't ribbentropn't pact
C
0 vote
201 views
1 answer
Argparse allow line break
C
0 vote
204 views
1 answer
Xamarin command listview button
C
0 vote
208 views
1 answer
Character stuffing program in c leadcode
C
0 vote
268 views
1 answer
I2c scanner
C
0 vote
221 views
1 answer
Redis as a service
C
Share