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
0 vote
162 views
1 answer
How to break a loop in c
C
0 vote
154 views
1 answer
Gtk widget change window title
C
1 vote
105 views
1 answer
Como declarar uma string em c
C
0 vote
146 views
1 answer
Graphics in C
C
0 vote
141 views
1 answer
How to open a website in c
C
0 vote
129 views
1 answer
Left me on read
C
0 vote
149 views
1 answer
Save text file c
C
0 vote
155 views
2 answers
C float to string
C
0 vote
157 views
1 answer
Largest value in u32
C
1 vote
144 views
1 answer
Passing a matrix in a function C
C
Share