annotation
  1. Content for list item
    1
  2. Content for list item

Câu hỏi 24009 - Kỹ thuật lập trình cơ sở - IT01

Cho biết đoạn chương trình sau thực hiện thao tác xử lí gì?

struct HangHoa{

string _tenHH;

float _soLuong;

float _donGia;

};

void XULY(int n, HangHoa ds[])

{

ofstream f;

f.open("hanghoa.dat", ios::out|ios::binary);

f.write((char*)&n, sizeof(int));

f.write((char*)ds, sizeof(HangHoa)*n);

f.close();

}

Chọn đáp án: