微软认证考试

When compressing data with the DeflateStream class, how do you specify a stream into which to write compressed data?()A、 Set the BaseStream property with the destination stream, and set the CompressionMode property to Compression.B、 Specify the stream to 

题目

When compressing data with the DeflateStream class, how do you specify a stream into which to write compressed data?()

  • A、 Set the BaseStream property with the destination stream, and set the CompressionMode property to Compression.
  • B、 Specify the stream to write into the DeflateStream object is created (for example, in the constructor).
  • C、 Use the Write method of the DeflateStream class.
  • D、 Register for the BaseSream event of the DeflateStream class.
参考答案和解析
正确答案:B
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

( 16 )要建立文件流并打开当前目录下的文件 file.dat 用于输入,下列语句中错误的是

A ) ifstream fin=ifstream.open ( "file.dat" ) ;

B ) ifstream*fir.=new ifstream ( "file.dat" ) ;

C ) ifstream fin; fin.open ( "file.dat" ) ;

D ) ifstream *fin=new ifstream ( ) ; fin 一 >open ( "file.dat" ) ;


正确答案:A

第2题:

下列可以打开随机文件的语句是( )。

A.Open”filel.dat”For Input As#1

B.Open”filel.dat”For Append As#1

C.Open”filel.dat”For Output As#1

D.Open”filel.dat”For Randow As#1 Len=20


正确答案:D
解析:本题主要考查随机文件与顺序文件的特点与区别,及文件操作的特点。Visual Basic中有3种文件访问的类型:顺序文件、随机文件、二进制文件。随机文件又称直接存取文件,简称随机文件或直接文件。随机文件的每个记录都有一个记录号,在写入数据时只要指定记录号,就可以把数据直接存入指定位置。而在读取数据时,只要给出记录号,就可直接读取。在记录文件中,可以同时进行读、写操作,所以能快速地查找和修改每个记录,不必为修改某个记录而像顺序文件那样,对整个文件进行读、写操作。其优点是数据存取较为灵活,方便,速度快,容易修改,主要缺点是占空间较大,数据组织复杂。顺序文件:顺序文件将文件中的记录一个接一个地按顺序存放。二进制访问能提供对文件的完全控制,因为文件中的字节可以代表任何东西,当要使文件的尺寸尽量小时,应使用二进制访问。在文件处理过程中,执行完Open操作后,程序将生成一个文件指针,程序可以调用LOF函数来获得返回给文件分配的字节数。在随机文件中,每个记录的长度是固定的,记录中的每个字段的长度也是固定的。因为是操作随机文件,所以选D。

第3题:

要求打开文件d:\file.dat,可写入数据,正确的语句是()。

A.ifstreaminfile("d:\file.dat",ios::in);

B.ifstreaminfile("d:\\file.dat",ios::in);

C.ofstreaminfile("d:\file.dat",ios::out);

D.fstreaminfile("d:\\file.dat",ios::in|ios::out);


参考答案:D

第4题:

Diesel engines are started by supplying_____into the cylinders in the appropriate sequence for the required direction.

A.cooling water

B.compressing air

C.compressed air

D.cylinder oil


正确答案:C

第5题:

若定义DAT DW 'A',则(DAT)和(DAT+1)两个相邻的地址单元中存放的数据是( )。

A.0041H

B.4100H

C.××41H

D.41××H


正确答案:B

第6题:

假设DAT为字节变量,下列三条指令中功能相同的是哪几条?______。

Ⅰ.MOVAL,DAT[2]

Ⅱ.MOVAL,DAT+2

Ⅲ.MOVAL,2[DAT]

A.三条都相同

B.仅Ⅰ和Ⅱ相同

C.仅Ⅰ和Ⅲ相同

D.仅Ⅱ和Ⅲ相同


正确答案:A
解析:DAT[2],DAT+2,2[DAT]都有效地表示DAT第二个字节,因此上面三条指令都是将DAT第二个字节送入AL。

第7题:

(34)如果准备读文件,打开随机文件“text.dat”d的正确语句是 A.Open"text.dat"For Write As#1 B.Open"text.dat"For Binary As#1 C.Open"text.dat"For Input As#1 D.Open"text.dat"For Random As#1


正确答案:D
【解析】准备读文件则应该以Random方式打开文件,即以随机存取方式打开文件。

第8题:

如果准备读文件,打开顺序文件"text.dat"的正确语句是

A.Open "text.dat" For Write As#1

B.Open "text.dar" For Binary As#1

C.Open "text.dat" For Input As#1

D.Open "text.dat" For Random As#1


正确答案:C
解析:顺序文件的读操作由Input语句来实现。

第9题:

如果准备读文件,打开顺序文件”text.dat”的正确语句是( )。

A.Open"text.dat"For Write As#1

B.Open"text.dat"For Binary As#1

C.Open"text.dat"For Input As#1

D.Open"text.dat"For Random As#1


正确答案:C

第10题:

执行下面的程序段后,DAT1单元的值是( )。 DAT1 DB 12H,34H DAT2 DB 56H,78H MOV AX, WORD PTR DAT1 CMP AX, WORD PTR DAT2 JA DONE MOV BX, WORD PTR DAT2 MOV OWRD PTR DAT2,AX MOV OWRD PTR DAT1, BX DONE: HLT

A.34H

B.78H

C.12H

D.56H


正确答案:D

更多相关问题