单选题
👁️ 浏览量:

试题题干

设 float x=2.5,y=3,1;,则表达式(int)(x+y)的类型为()

A

float

B

double

C

int

D

char

参考答案

正确答案:

试题解析

(int)(x+y)将x+y的结果强制转换为整型。