单项选择题
有以下程序:
#include <iostream>
#include <fstream>
using namespace std;
int main ( )
ofstream ofile;
char ch;
ofile.open ("abc.txt");
cin>>ch;
while (ch!='#' )
cin>>ch;
ofile.put(ch);
ofile.close();
return 0;
当从键盘终端连续输入的字符为a、b、c和#时,文件abc.txt中的内容为( )。
A) 程序编译时出错
B) abc#
C) abc
D) #