The C Programming Language Chapter-1
Chapter-1 A Tutorial Introduction
Notes of The C programming Language
Integer Division of C
In C, integer division will truncate the result to zero, regardless of whether the result is positive or negative.
printf Conversion Specification %f
For example, %6.4f
means printf
should print the value as floating point, at least 6 characters wide (it means the total width) and 4 after the decimal point.
1 |
|
1 | printFloatWidth1: 1111.2220 |
If the valid digits of the value cannot fill the least width, printf
will fill it with spaces, as illustrated in printFloatWidth2
.