4.6 Modification of expression type during assignment

  ------------------------------------------------------

 

      If a type different from the type of variable to be calculated is

  written after the equal sign, all variables involved in the calculation

  will be converted to this new type, and only the final result will be

  converted to the type of the variable being calculated. For example:

 

  int i, a;

  int i, a;

  char c;

      i = a * b + c ;

 

      The variables a, b, and c in this example will be converted before

  calculation to type 'int' (variable type 'i'). But if the expression is

  instead written as:

 

    i = long a * b + c ;

 

      then a, b, and c in this example will be converted before calculation

  to type 'long', and the final result will be converted to type 'i'

  (integer).