如果文件1.txt中的内容如下,则执行下面C++代码时,注释了####那行代码所输出的x的值为( )。
50 2024 3.16 I
love
GESP!
int main()
{
ifstream fin;
string line;
int x;
fin.open("1.txt",ios::in);
for (int i=0; i< 2; i++){
fin >> line;
cout << line << endl;
}
fin>>x;
cout << x << endl; //####
cout << endl;
return 0;
}
正在加载题目数据…
子题
该题型需在试卷/作业中作答,单题练习暂不支持
答案解析