本答案对应课程为:点我自动跳转查看
本课程起止时间为:2020-12-28到2021-03-01
本篇答案更新状态:已完结

第二章 程序设计基础 单元测验2

小提示:本节包含奇怪的同名章节内容

31、 问题:A computer is a device that can be instructed to carry out an arbitrary set of arithmetic or logical operations __. The ability of computers to follow generalized sequences of operations, called programs, enable them to perform a wide range of tasks.
选项:
A:manually
B:semiautomatically
C:automatically
D:auxiliary
答案: 【automatically

32、 问题:A computer program is a collection of instructions that performs a specific task when executed by a computer. A computer requires programs to function and typically executes the program’s instructions in a __.
选项:
A:memory unit
B:stored-program
C:central processing unit
D:input / output device
答案: 【central processing unit

33、 问题:A recipe is a list of ingredients and a set of __ that tell you how to cook something.
选项:
A:instructions
B:program
C:mathematical steps
D:data structures
答案: 【instructions

34、 问题:A program is a set of __ that a computer follows in order to perform a particular task.
选项:
A:instructions
B:program
C:mathematical steps
D:data structures
答案: 【instructions

35、 问题:When you __ a computer, you give it a set of instructions to make it able to perform a particular task.
选项:
A:instructions
B:program
C:mathematical steps
D:data structures
答案: 【program

36、 问题:An algorithm is a series of __, especially in a computer program, which will give you the answer to a particular kind of problem or question.
选项:
A:instructions
B:program
C:mathematical steps
D:data structures
答案: 【mathematical steps

37、 问题:Computer programming (often shortened to programming) is a process that leads from an original formulation of a computing problem to executable computer programs. Programming involves activities such as analysis, developing understanding, generating algorithms, verification of requirements of algorithms including their __ and resources consumption, and implementation (commonly referred to as coding) of algorithms in a target programming language.
选项:
A:performance
B:correctness
C:property
D:capability
答案: 【correctness

38、 问题:用程序设计语言编写的程序称为源代码。源代码要用编译器(compiler)转换成在计算机程序运行环境中可直接执行的由指令组成的机器码。有些形式的源代码可以在__的帮助下在计算机中执行。
选项:
A:coder
B:programmer
C:software engineer
D:interpreter
答案: 【interpreter

39、 问题:以下关于算术(Arithmetic)运算符的解释中,哪个是错误的?
选项:
A:/:返回其参数之商。如果两个参数都是整数,获得整数除法之商(即舍弃任何余数)。
B:%:只对整数参数进行运算,返回参数的整数除法的余数。
C:++:只对有左值的参数进行操作。当放在其参数后时,参数增1并且返回该参数递增之前的值;当放在其参数前时,参数增1并且返回该参数递增之后的值。
D:–:只对有右值的参数进行操作。当放在其参数后时,参数增1并且返回该参数递减之前的值;当放在其参数前时,参数增1并且返回该参数递减之后的值。
答案: 【–:只对有右值的参数进行操作。当放在其参数后时,参数增1并且返回该参数递减之前的值;当放在其参数前时,参数增1并且返回该参数递减之后的值。

40、 问题:以下关于C#的运算符的解释中,哪个是错误的?
选项:
A:@”a”:逐字的文本,不忽略转义字符。
B:(a)b:将b值投射到类型a。
C:a + b:如果a和b是字符串,把两者连接在一起。如果有一个为null,用空串代替它。如果一个是字符串,另一个是非字符串对象,连接前会先调用其ToString方法。如果a和b是委托,就进行委托连接。
D:a ?? b:如果a是null,返回b,否则返回a。
答案: 【@”a”:逐字的文本,不忽略转义字符。

41、 问题:执行下列语句序列后,i 和 j 的值分别是int i=3, j=5;if(i-1>j) i–;else j–;
选项:
A:2,4
B:2,5
C:3,4
D:3,5
答案: 【3,4

42、 问题:在C#中,表示一个字符串的变量应使用以下哪条语句定义?
选项:
A:CString str
B:string str;
C:Dim str as string
D:char* str;
答案: 【string str;

43、 问题:以下选项中, 合法的赋值语句是
选项:
A:int a==1
B:int i=1;int j=i++;
C:int a=a+1=2;
D:int i=int (j);
答案: 【int i=1;int j=i++;

44、 问题:C#中,新建一字符串变量str,并将字符串”Tom’s Living Room”保存到变量中,则应该使用下列哪条语句?
选项:
A:string str = “Tom’s Living Room”;
B:string str =”Tom’s Living Room”;
C:string str(“Tom’s Living Room”);
D:string str(“Tom”s Living Room”);
答案: 【string str = “Tom’s Living Room”;

45、 问题:在C#中,byte类型表示的范围是____
选项:
A:0—-255
B:1—-256
C:-128—-127
D:0—65535
答案: 【0—-255

46、 问题:C#中每个int 类型的变量占用_个字节的内存。
选项:
A:1
B:2
C:4
D:8
答案: 【4

47、 问题:以下关于 if 语句和 switch 语句的说法, 正确的是
选项:
A:如果在 if 语句和 switch 语句中嵌入 break 语句, 则在程序执行过程中, 一旦执行到break 语句, 就会结束相应的执行, 转向执行其后面的语句
B:凡是能够使用 if 语句的地方就可以使用 switch 语句, 反之亦然
C:if 语句有 3 种基本形式: if…、 if…else…和 if…else if…else…
D:switch 语句是实现“单判断二分支” 的选择结构, if语句是实现“单判断多分支” 的选择结构
答案: 【if 语句有 3 种基本形式: if…、 if…else…和 if…else if…else…

48、 问题:以下叙述正确的是
选项:
A:do……while 语句构成的循环不能用其他语句构成的循环来代替
B:do……while 语句构成的循环只能用 break 语句结束循环
C:用 do……while 语句构成的循环, 在 while 后的表达式为 true 时结束循环
D:用 do……while 语句构成的循环,在 while 后的表达式应为关系表达式或逻辑表达式
答案: 【用 do……while 语句构成的循环,在 while 后的表达式应为关系表达式或逻辑表达式

49、 问题:下列程序的输出结果是using System;class Program{ public static void Main(string[] args){ int x=1,a=0,b=0; switch(x){ case 0: b++; break; case 1: a++; break; case 2: a++; b++; break; } Console.WriteLine(“a={0},b={1}” ,a,b); }}
选项:
A:a=2,b=1
B:a=1,b=1
C:a=1,b=0
D:a=2,b=2
答案: 【a=1,b=0

50、 问题:在 C#语言中, switch 语句用__来处理不匹配 case 语句的值
选项:
A:default
B:anyelse
C:break
D:goto
答案: 【default

51、 问题:下面对 i 值的输出结果说法正确的是_____.namespace Answer { class Program { static void Main(string[] args) { int i=0; do{ i++; }while(i<5) Console.WriteLine(“i的值为:{0}”,i); } }}
选项:
A:i的值为:0
B:i的值为:5
C:i的值为:4
D:i的值为:6
答案: 【i的值为:5

52、 问题:程序设计的目的是找到一个能自动执行一项特定任务或解决给定问题的指令序列。在程序设计过程中,会经常涉及各种专业技能或知识,如应用领域知识、特殊算法、形式逻辑等。程序设计过程包括__、测试方案、运行维护等阶段。
选项:
A:分析问题和规范化
B:设计解决方案(即算法)
C:验证方案
D:实现解决方案(即编写程序)
答案: 【分析问题和规范化;
设计解决方案(即算法);
验证方案;
实现解决方案(即编写程序)

53、 问题:以下关于程序设计语言的描述中,哪些是正确的?
选项:

本门课程剩余章节答案为付费内容
本文章不含期末不含主观题!!
本文章不含期末不含主观题!!
支付后可长期查看
有疑问请添加客服QQ 2356025045反馈
如遇卡顿看不了请换个浏览器即可打开
请看清楚了再购买哦,电子资源购买后不支持退款哦

   

发表评论

电子邮件地址不会被公开。 必填项已用*标注