[计算机类试卷]国家二级VB机试(选择题)模拟试卷186及答案与解析.doc

上传人:王申宇 文档编号:500214 上传时间:2018-11-30 格式:DOC 页数:17 大小:49KB
下载 相关 举报
[计算机类试卷]国家二级VB机试(选择题)模拟试卷186及答案与解析.doc_第1页
第1页 / 共17页
[计算机类试卷]国家二级VB机试(选择题)模拟试卷186及答案与解析.doc_第2页
第2页 / 共17页
[计算机类试卷]国家二级VB机试(选择题)模拟试卷186及答案与解析.doc_第3页
第3页 / 共17页
[计算机类试卷]国家二级VB机试(选择题)模拟试卷186及答案与解析.doc_第4页
第4页 / 共17页
[计算机类试卷]国家二级VB机试(选择题)模拟试卷186及答案与解析.doc_第5页
第5页 / 共17页
点击查看更多>>
资源描述

1、国家二级 VB机试(选择题)模拟试卷 186及答案与解析 一、选择题 1 若变量 a未事先定义而直接使用 (例如: a=0),则变量 a的类型是 ( A) Integer ( B) String ( C) Boolean ( D) Variant 2 为把圆周率的近似值 3 14159存放在变量 pi中,应该把变量 pi定义为 ( A) Dim pi As Integer ( B) Dim pi(7)As Integer ( C) Dim pi As Single ( D) Dim pi As Long 3 若在窗体模块的声明 部分声明了如下自定义类型和数组 Private Type rec

2、Code As Integer: Caption As String End rype Dim arr(5)As rec 则下面的输出语句中正确的是 ( A) Print alT Code(2), arr Caption(2) ( B) Print arr Code, arr Caption ( C) Print arr(2) Code, art(2) Caption ( D) Print Code(2), Caption(2) 4 如下关于变体类型变量的 叙述中,错误的是 ( A)变体类型数组中只能存放同类型数据 ( B)使用 Array初始化的数组变量,必须是 Variant类型 ( C)

3、没有声明而直接使用的变量其默认类型均是 Variant ( D)在同 _程序中,变体类型的变量可以被多次赋以不同类型的数据 5 为了声明一个长度为 128个字符的定长字符串变量 StrD,以下语句中正确的是 ( A) Dim StrD As String ( B) Dim StrD As String(128) ( C) Dim StrD As String128 ( D) Dim StrD As String*128 6 有如下语句序列: Dim a, b As Integer Print a Print b执行以上语句序列,下列叙述中错误的是 ( A)输出的 a值是 0 ( B)输出的 b

4、值是 O ( C) a是变体类型变量 ( D) b是整型变量 7 以下自定义数据类型的语句中,正确的是 ( A) Type student ID As String*20 name As String*10 age As Integer End student ( B) Type student ID As String*20 name As String*10 age As Integer End Type ( C) Type student ID As String name As String age As Integer End student ( D) Type ID As Stri

5、ng*20 name As String*10 age As Integer End Type student 8 有数据定义语句: Dim a, b As Integer Dim x, y as Integer执行语句后,不 是整型变量的是 ( A) a ( B) b ( C) x ( D) y 9 VB中,若没有显式声明变量的数据类型,则默认的类型是 ( A)整型 ( B)字符型 ( C)日期型 ( D)变体类型 10 假定有如下的程序段: Dim intVarAs Integer intvar=True Print intVar则输出结果是 ( A) 0 ( B)一 1 ( C) Tru

6、e ( D) False 11 下面为单精度实型 (即单精度浮点型 )变量的是 ( A) x$ ( B) x 全 局 fPublic变量:全局变量也称为全程变量,在标准模块的声明部分声明。全局变量的作用域最大,可以在工程的每个模块、每个过程中使用。 【知识模块】 数据类型及运算 30 【正确答案】 C 【试题解析】 变量是用一个名称来表示的,给变量命名时应遵循规则: 名称只能由字母、数字和下划线组成; 名称的第一个字符必须是英文字母,最后一个字符可以是类型说明符; 名称的有效字符为 255个;不能用 VB的保留字作变量名,但变量名中可以包含保留字,如 ConstA; 变量名也不能是末尾带有类型说明符的保留字,如 Dim!是不合法的变量名;不区分字母的大小写。 【知识模块】 数据类型及运算

展开阅读全文
相关资源
猜你喜欢
  • BS PD IEC TS 62763-2013_5284 Pilot function through a control pilot circuit using PWM (pulse width modulation) and a control pilot wire《通过控制导向线使用PWM (脉冲宽度调制) 的导向功能和控制导向线》.pdf BS PD IEC TS 62763-2013_5284 Pilot function through a control pilot circuit using PWM (pulse width modulation) and a control pilot wire《通过控制导向线使用PWM (脉冲宽度调制) 的导向功能和控制导向线》.pdf
  • BS ISO 8070-2007 Milk and milk products - Determination of calcium sodium potassium and magnesium contents - Atomic absorption spectrometric method《牛奶和奶制品 钙、钠、钾和镁含量的测定 原子吸.pdf BS ISO 8070-2007 Milk and milk products - Determination of calcium sodium potassium and magnesium contents - Atomic absorption spectrometric method《牛奶和奶制品 钙、钠、钾和镁含量的测定 原子吸.pdf
  • BS ISO 8082-1-2009 Self-propelled machinery for forestry - Laboratory tests and performance requirements for roll-over protective structures - General machines《林业用自推进机械 防倾.pdf BS ISO 8082-1-2009 Self-propelled machinery for forestry - Laboratory tests and performance requirements for roll-over protective structures - General machines《林业用自推进机械 防倾.pdf
  • BS ISO 8082-2-2011 Self-propelled machinery for forestry Laboratory tests and performance requirements for roll-over protective structures Machines having a rotating platf.pdf BS ISO 8082-2-2011 Self-propelled machinery for forestry Laboratory tests and performance requirements for roll-over protective structures Machines having a rotating platf.pdf
  • BS ISO 8083-2006 Machinery for forestry - Falling-object protective structures (FOPS) - Laboratory tests and performance requirements《林业机械 落体防护装置(FOPS) 实验室试验和性能要求》.pdf BS ISO 8083-2006 Machinery for forestry - Falling-object protective structures (FOPS) - Laboratory tests and performance requirements《林业机械 落体防护装置(FOPS) 实验室试验和性能要求》.pdf
  • BS ISO 8086-2004 Dairy plant - Hygiene conditions - General guidance on inspection and sampling procedures《乳品厂 卫生条件 检验和取样程序通用指南》.pdf BS ISO 8086-2004 Dairy plant - Hygiene conditions - General guidance on inspection and sampling procedures《乳品厂 卫生条件 检验和取样程序通用指南》.pdf
  • BS ISO 8096-2005 Rubber- or plastics-coated fabrics for water resistant clothing - Specification《雨衣用橡胶或塑料涂覆织物 规范》.pdf BS ISO 8096-2005 Rubber- or plastics-coated fabrics for water resistant clothing - Specification《雨衣用橡胶或塑料涂覆织物 规范》.pdf
  • BS ISO 8097-2001 Aircraft Minimum airworthiness requirements and test conditions for certified air cargo unit load devices《航空器 经认证的航空货运集装单元装置最低适航性要求和试验条件》.pdf BS ISO 8097-2001 Aircraft Minimum airworthiness requirements and test conditions for certified air cargo unit load devices《航空器 经认证的航空货运集装单元装置最低适航性要求和试验条件》.pdf
  • BS ISO 8114-1993 Textile machinery and accessories - Spindles for ring-spinning and doubling machines - List of equivalent terms《纺织机械和附件 环锭纺纱机和并线机用锭子 同义术语表》.pdf BS ISO 8114-1993 Textile machinery and accessories - Spindles for ring-spinning and doubling machines - List of equivalent terms《纺织机械和附件 环锭纺纱机和并线机用锭子 同义术语表》.pdf
  • 相关搜索

    当前位置:首页 > 考试资料 > 职业资格

    copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
    备案/许可证编号:苏ICP备17064731号-1