Question:You need to write a code segment that transfers the first 80 bytes from a stream variable named stream1 into a new byte array named byteArray. You also need to ensure that the code segment assigns the number of bytes that are transferred to an integer variable named bytesTransferred. Which code segment should you use?
A stream1->Write(byteArray, 0, 80); bytesTransferred = byteArray->Length;
B bytesTransferred = stream1->Read(byteArray, 0, 80);
C while (bytesTransferred < 80) {
stream1->Seek(1, SeekOrigin::Current);
byteArray[bytesTransferred++] =
Convert::ToByte(stream1->ReadByte());
"A Composite Solution With Just One Click" - Certification Guaranteed 194 Microsoft 70-536 Exam
}
D for (int i = 0; i < 80; i++) {
stream1->WriteByte(byteArray[i]);
bytesTransferred = i;
if (!stream1->CanWrite) {
break;
}
}