Conversions Can Result in Incorrect Values
Converting values to lower fundamental types can result in incorrect values. Therefore, a value can be converted to a lower fundamental type only by explicitly assigning the value to a variable of lower type (some compilers will issue a warning in this case) or by using a cast operator (see Section 4.7). Function argument values are converted to the parameter types in a function prototype as if they were being assigned directly to variables of those types. If a
square function that uses an integer parameter is called with a floating-point argument, the argument is converted to
int (a lower type), and
square could return an incorrect value. For example,
Common Programming ...