C语言程序运行结果解析:-1.53*3 强制类型转换
C语言程序:
#include<stdio.h>
main()
{
int a;
a = (int)(-1.53*3);
printf('%d\n', a);
}
程序的运行结果是 (B),解析:
运算过程为 -1.53 * 3 = -4.59,强制类型转换为 int 类型后取整为 -4。
原文地址: https://www.cveoy.top/t/topic/joyw 著作权归作者所有。请勿转载和采集!