参考链接:https://www.runoob.com/cprogramming/c-type-casting.html
强制类型转换是将一种数据类型显示的转换为另外一种指定的数据类型

//(type) expression
int i,j=10,20;
float sum;
sum=(float) i/j;//强制类型转换的优先级大于算术优先级

整数提升

整数提升是指把小于 int 或 unsigned int 的整数类型转换为 int 或 unsigned int 的过程

常用的算术转换

就是按照相应的高低次序转换为最高的类型

相关文章:

  • 2021-06-10
  • 2021-08-24
  • 2021-06-14
  • 2022-12-23
  • 2021-10-02
  • 2021-10-15
猜你喜欢
  • 2021-09-04
  • 2022-01-09
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案