When different arithmetic types are used as operands in certain types of expressions, standard conversions known as usual arithmetic conversions are applied. These conversions are applied according to the rank of the arithmetic type: the operand with a type of lower rank is converted to the type of the operand with a higher rank. This is known as integral or floating point promotion.

For example, when the values of two different integral types are added
together, both values are first converted to the same type: when a `short
int` value and an `int` value are added together, the `short int` value is converted to the `int` type. Expressions and operators provides a list of the operators and expressions that participate
in the usual arithmetic conversions.

The ranking of arithmetic types, listed from highest to lowest, is as follows:

Operand type |
---|

long double or long double _Complex |

double or double _Complex |

float or float _Complex |

Operand type |
---|

unsigned long long or unsigned
long long int |

long long or long long int |

unsigned long int |

long int^{1} |

unsigned int^{1} |

int and enumerated types |

short int |

char, signed char and unsigned char |

Boolean |

Notes:

- If one operand has
`unsigned int`type and the other operand has`long int`type but the value of the`unsigned int`cannot be represented in a`long int`, both operands are converted to`unsigned long int`.

Related information