单选题
若在窗体模块的声明部分声明了如下自定义类型和数组:
Private Type ree
Code As Integer
Caption As String
End Type
Dim arr(5)As rec
则下面的输出语句中正确的是______。
A、
Print arr.Code(2),arr.Caption(2)
B、
Print arr.Code,arr.Caption
C、
Print arr(2).Code,arr(2).Caption
D、
Print Code(2),Caption(2)
【正确答案】
C
【答案解析】
[解析] 定义一个自定义类型的数组,数组元素表示为:数组名(下标).成员名,故选C。
提交答案
关闭