单选题
C++
题号 #2657809
从一个文件中读一个字节存于char c;正确的语句为( )。
参考答案
B
答案解析
略
你可能感兴趣的试题
A.file.write(reinterpret_cast<const char *>(&c), sizeof(c));
B.file.write(reinterpret_cast<char *>(&c), sizeof(c));
C.file.write((char *)(&c), sizeof(c));
D.file.write((const char *)c, sizeof(c));
A.myfile.seekg(1,ios::end);
c=myfile.get();
c=myfile.get();
B.myfile.seekg(-1,ios::end);
c=myfile.get();
c=myfile.get();
C.myfile.seekp(ios::end,0);
c=myfile.get();
c=myfile.get();
D.myfileseekp(ios::end,1);
c=myfile.get();
c=myfile.get();