下列数据类型定义中,正确的是

admin2013-01-23  30

问题 下列数据类型定义中,正确的是

选项 A、Type Student        Num As Long        Name As String   End Type
B、Type Student        Num As Integer        Name As String * 10   End Type
C、Private Type        Num As Long        Score As Single   End Type
D、Private Type Student        Name As String        Score(10)As String * 10   End Type

答案2

解析 自定义类型的一般格式为:
   Type<数据类型名>
   <成员名> As 类型名
   ……
   End Type
   根据自定义类型的格式可以排除C、D两项。成员名如果是字符串类型时,一般要指明字符串长度。排除选项A,只有B项是正确的。
转载请注明原文地址:https://jikaoti.com/ti/f2O0FFFM
0

最新回复(0)