第23592题
判断给定C++代码执行后输出结果是否为100

执行下面代码会输出100:

int main() {
    ofstream fout("data.txt");
    fout << 10 << " " << 20 << endl;
    fout << 30 << " " << 40;
    fout.close();
    ifstream fin("data.txt");
    int a, b, c, d;
    fin >> a >> b >> c >> d;
    fin.close();
    cout << a + b + c + d;
    return 0;
}
A

正确

B

错误

提交0次 正确率0.00%
答案解析