单选题 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();               
B.myfile.seekg(-1,ios::end);
   c=myfile.get();
C.myfile.seekp(ios::end,0);   
   c=myfile.get();                
D.myfileseekp(ios::end,1);
   c=myfile.get();
A.一个字符  
B.当前字符  
C.一行字符  
D.指定若干字节
找试题 · 找答案 · 找资料 在线模考