测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A21965. 执⾏下⾯代码会输出 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; fi…

判断题 较难

题目描述

执⾏下⾯代码会输出  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;
}

选项(单选)

上一题 下一题