This is, as you rightly say, a cast. It /converts/ a float value in `a`
to it's closest representation as int. Hence, (int)17.5 == 17.
Artie led you off the track here by saying "conversion specifier". A s a
matter of fact "%d" is a "format specifier". It tells printf()
[snip]
Actually, Artie was mostly correct. Here's some exact wording copied
from the C standard, paragraphs 3 and of "7.19.6.1 The fprintf
function":
====
3 The format shall be a multibyte character sequence, beginning and
ending in its initial shift state. The format is composed of zero or
more directives: ordinary multibyte characters (not %), which are
copied unchanged to the output stream; and conversion specifications,
each of which results in fetching zero or more subsequent arguments,
converting them, if applicable, according to the corresponding
conversion specifier, and then writing the result to the output
stream.
4 Each conversion specification is introduced by the character %.
After the %, the following appear in sequence:
— Zero or more flags (in any order) that modify the meaning of the
conversion specification.
— An optional minimum field width. If the converted value has fewer
characters than the field width, it is padded with spaces (by default)
on the left (or right, if the left adjustment flag, described later,
has been given) to the field width. The field width takes the form of
an asterisk * (described later) or a decimal integer.
— An optional precision that gives the minimum number of digits to
appear for the d, i, o, u, x, and X conversions, the number of digits
to appear after the decimal-point character for a, A, e, E, f, and F
conversions, the maximum number of significant digits for the g and G
conversions, or the maximum number of bytes to be written for s
conversions. The precision takes the form of a period (.) followed
either by an asterisk * (described later) or by an optional decimal
integer; if only the period is specified, the precision is taken as
zero. If a precision appears with any other conversion specifier, the
behavior is undefined.
— An optional length modifier that specifies the size of the argument.
— A conversion specifier character that specifies the type of
conversion to be applied.
====
Notice specifically the final sentence of paragraph 4.
In C standard terminology, "%d" is a "conversion specification" of
which the 'd' is the conversion specifier.