單項(xiàng)選擇題

假定已定義浮點(diǎn)型變量data,以二進(jìn)制方式把data的值寫入輸出文件流對(duì)象outfile中去,正確的語句是()

A.outfile.write((float*)&data,sizeof(float));
B.outfile.write((float*)&data,data);
C.outfile.write((char*)&data,sizeof(float));
D.outfile.write((char*)&data,data);

微信掃碼免費(fèi)搜題