全部题库 / VB / 试题详情
单选题 VB
2013-08-15

若在窗体模块的声明部分声明了如下自定义类型和数组:
Private Type rec
Code As Integer
Caption As St ring
End Type
Dim art(5)As rec
则下面的输出语句中正确的是(  )。

A.Print arr.Code(2),art.Caption(2)
B.Print art.Code,arr.Caption
C.Print arr(2).Code,arr(2).Caption
D.Print Code(2),Caption(2)

参考答案

C

答案解析

C。【解析】本题定义了元素为5的数组,并且定义Code和Caption都为整型,正确输出语句应为Print arr(2).Code,ar,(2).Caption。

你可能感兴趣的试题