以下C++代码执行后的输出结果是?
已知当前编译环境为64位GCC,int占4字节,float占4字节,typeid返回的类型名中int对应"i",float对应"f",char对应"c"。代码如下:
#include <iostream>
#include <typeinfo>
using namespace std;
int main() {
int a = 10;
char b = 'a'; // 字符'a'的ASCII值为97
float c = 1.5f;
cout << sizeof(a + b) << " " << typeid(b + c).name() << endl;
return 0;
}
正在加载题目数据…
子题
该题型需在试卷/作业中作答,单题练习暂不支持
答案解析