单选题

如果文件 1.txt 中的内容如下,则执行下面C++代码时,注释了 #### 那行代码所输出的 x 的值为(    )。

50 2024 3.16 I

love

GESP!

nt 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;

}

A

5

B

2024

C

3

D

0

赣ICP备20007335号-2