Explicit Type Cast Operator
Earlier, we cast a literal to type float by entering it as: 4.0f
We can cast the variable instead by using the cast operator: (type)variable
Example: Integer Divide
Floating Point Divide
The typecast used in the code fragment on the right temporarily converts the variable x into a float for the duration of the operation. This forces the operation to use float as its type, yielding the desired result.