Type Conversion in C++
Type Conversion means conversion of one data-type to another data-type. In C Plus Plus (C++), type conversion can be done by two ways: Automatic Conversion Type Casting 1) Automatic Conversion: In C++, if we have mixed mode expression (i.e., different types of data in one expression) then the lower data-type variable is automatically converted to the data-type of the higher data-type variable. Let us illustrate this with am example as follows: int c = 7; float a = 155.5; double t = c * a; In the above example, in expression: double t = c * a; firstly, variable c of the type int is converted to type float and is stored in a temporary variable before being multiplied by variable a of type float. Also, the result of multiplication c * a which comes in type float is then converted to type double and then is assigned to variable...