B. 屏幕上输出了10个以上字符,程序出错。因为result数组的长度为10,但是读取了20个字节,超出了数组的范围,会导致未定义的行为。

对于代码片段:‏#include fstream#include iostreamusing namespace std;int main fstream binaryio; Create stream object Read array from the file binaryioopenarraydat iosin iosbinary; char result10 = 0; b

原文地址: http://www.cveoy.top/t/topic/cEJa 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录