The following table shows the order of precedence.
The expression in the following example is calculated from left or right.
The process in which one pre-defined type of expression is converted into another type is called conversion.
There are two types of conversion in C++.
Data type can be mixed in the expression.
When two operands of different type are encountered in the same expression, the lower type variable is converted to the higher type variable.
The following table shows the order of data types.
The int value of b is converted to type float and stored in a temporary variable before being multiplied by the float variable c.
The result is then converted to double so that it can be assigned to the double variable a.