2. 在C++中,以下哪个语句用于打开文件进行写入操作?
A. ifstream file("example.txt");
B. ofstream file("example.txt");
C. fstream file("example.txt");
D. file.open("example.txt", ios::in);
A. ifstream file("example.txt");
B. ofstream file("example.txt");
C. fstream file("example.txt");
D. file.open("example.txt", ios::in);
Scratch3.0 全国青少年软件编程等级考试 Python Scratch图形化一级 Scratch图形化四级 Scratch图形化三级 Scratch图形化二级 电子学会