版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、精选优质文档-倾情为你奉上Multiple Choice Quiz 21 分数: 8/8 Which of the following could be represented by one bit of information? 选择一个答案 a. the position of a light switch b. an ASCII character c. the color of a single pixel on a true-color computer display d. the current channel of a television receiver 正确这次
2、提交的分数:8/8。Question 2 分数: 8/8 In C, what is the following binary number in hexadecimal?选择一个答案 a. 0xD5 b. 0xB5 c. 0xAB d. 0x5D 正确这次提交的分数:8/8。Question 3 分数: 8/8 What is the value of the following C expression?0x1234 0x5432选择一个答案 a. 0x4606 b. 0x5636 c. 0x1030 d. 0x5434 正确这次提交的分数:8/8。Question 4 分数: 8/8 W
3、hat is the value of the following C expression?0x1234 & 0x5432选择一个答案 a. 0x1030 b. 0x1111 c. 0x5636 d. 0x6666 正确这次提交的分数:8/8。Question 5 分数: 8/8 How is 46 (decimal) represented in an 8-bit 2's complement binary format?选择一个答案 a. b. c. d. 正确这次提交的分数:8/8。Question 6 分数: 8/8 How is -10 (decimal) repr
4、esented in an 8-bit 2's complement binary format?选择一个答案 a. b. c. d. 正确这次提交的分数:8/8。Question 7 分数: 8/8 In a computer with 4-byte words, which of the following C expressions tests whether ptr contains the address of a word?I. (ptr & 3) = 0II. (ptr | 3) = 0III. (ptr % 4) = 0选择一个答案 a. III only b.
5、 II only c. I only d. I and III only 正确这次提交的分数:8/8。Question 8 分数: 8/8 What happens in a C program when an addition would cause integer overflow? 选择一个答案 a. The correct value is coerced to a floating point number. b. An incorrect result is produced and execution continues. c. An exception-handler
6、 is called with the two operands as parameters. d. Execution is terminated. 正确这次提交的分数:8/8。Question 9 分数: 8/8 What is the purpose of the exponent in floating point numbers? 选择一个答案 a. to specify the superscript b. to specify the base as binary, octal, or hexadecimal c. the mantissa is raised to t
7、he power of the exponent d. to indicate where the decimal or binary point should be 正确这次提交的分数:8/8。Question 10 分数: 8/8 Which of the following statements about floating-point numbers in C is true?I. Floating-point numbers are often only approximations of real numbers.II. A 32-bit float only approximat
8、es decimal fractions, but a 64-bit double represents them exactly.III. Floating-point numbers can represent any rational real number but not irrationals.选择一个答案 a. I and III only b. I and II only c. II only d. I only 正确这次提交的分数:8/8。Question 11 分数: 8/8 Which of the following numerical operations is mos
9、t likely to lead to loss of precision? 选择一个答案 a. Integer addition b. Floating-point addition c. Floating-point multiplication d. Integer multiplication 正确这次提交的分数:8/8。Question 12 分数: 8/8 In C, using default floating point settings, what happens when a floating-point computation results in an ove
10、rflow? 选择一个答案 a. An erroneous value is computed and execution continues. b. A special value "infinity" is computed, testable with _finite(). c. An exception is raised unless disabled by calling _controlfp(). d. Program execution is halted. 正确这次提交的分数:8/8。Multiple Choice Quiz 31 分数: 7/7
11、 The program counter contains选择一个答案 a. the number of times a program has been executed b. the address of the CPU instruction that is about to be fetched c. the number of CPU instructions a program has executed so far d. the amount of memory a program is currently using 正确这次提交的分数:7/7。回复历史:#动作回答时间原始分数
12、成绩评分the address of the CPU instruction that is about to be fetched15年09月 24日的12:59:14772关闭the address of the CPU instruction that is about to be fetched15年09月 24日的13:02:5077Question 2 分数: 7/7 Immediately after the CPU executes an instruction that is neither a branch nor a jump instruction, the progr
13、am counter选择一个答案 a. is incremented by one b. is incremented to point to the following instruction c. has a value that cannot be determined without further information d. remains unchanged 正确这次提交的分数:7/7。Question 3 分数: 7/7 A CPU register is a word of CPU memory that 选择一个答案 a. houses a critical variabl
14、e for the duration of the execution of a program b. is explicitly loaded and unloaded from normal memory by compiler-generated instructions c. records the results of periodic CPU diagnostics d. is automatically loaded when a CPU instruction refers to a word of normal memory 正确这次提交的分数:7/7。Question 4
15、分数: 7/7 Which of the following computations may be performed by exactly one CPU instruction?1. a = 5;2. a = b + c * 5;3. for (i = 0; i < 10; i += ai+);选择一个答案 a. I only b. II only c. I, II, and III d. I and II only 正确这次提交的分数:7/7。Question 5 分数: 8/8 Suppose that, using a tool such as the memory wind
16、ow of Visual C+, we found that a certain set of contiguous memory locations contained the integer 0xC605CD623A. What could these memory locations hold?1. the integer 0xC605CD623A2. a string3. a CPU instruction选择一个答案 a. I only b. I, II, and III c. I and II only d. III only 正确这次提交的分数:8/8。Question 6 分数
17、: 8/8 A branch instruction 选择一个答案 a. sets the program counter to one of many possible values b. unconditionally sets the program counter to its operand c. sets the program counter to one of two possible values d. increases the program counter by a fixed amount 正确这次提交的分数:8/8。Question 7 分数: 8/8 A jump
18、 instruction 选择一个答案 a. changes a pointer to point to the next element of an array b. changes the program counter only if its operand is equal to zero c. increases the program counter d. unconditionally sets the program counter to its operand 正确这次提交的分数:8/8。Question 8 分数: 8/8 The machine code generate
19、d from source code by a compiler 选择一个答案 a. does not preserve all the information given in the source code b. can be easily inspected to check the correctness of the compiler c. executes more quickly than the source code d. associates variable values with their names 正确这次提交的分数:8/8。Question 9 分数: 8/8
20、Which of the following are true of the effect that optimizations have on the machine code generated by compilers? I.The resulting code will be faster and/or smaller. II.The resulting code will be clearer. III.The resulting code will be harder to debug. 选择一个答案 a. I, II, and III b. I only c. I and III
21、 only d. I and II only 正确这次提交的分数:8/8。Question 10 分数: 8/8 Which of the following is a good reason (are good reasons) to equip the CPU with small amounts of fast memory? I.To make the design of the compiler simpler II.To make some CPU instructions smaller III.To make some CPU instructions faster 选择一个答
22、案 a. II only b. III only c. I, II, and III d. II and III only 正确这次提交的分数:8/8。Question 11 分数: 8/8 11.Which of the following must be true if a program is stopped at a specific line within the Visual C+ debugger? I.There is at least one breakpoint enabled. II.There is a breakpoint enabled on that line.
23、III.There is a breakpoint enabled on the line preceding that line.选择一个答案 a. none b. I and II only c. I and III only d. I only 正确这次提交的分数:8/8。Question 12 分数: 8/8 Within Visual C+, which of the following will reveal the value of a variable when the program is stopped at a breakpoint? I.Placing the mous
24、e pointer over the variable name in the source file window. II.Inserting a printf() in the program. III.Typing the variable name on the "Watch" window. 选择一个答案 a. II and III only b. I and III only c. III only d. I, II, and III 正确这次提交的分数:8/8。Question 13 分数: 8/8 Programs compiled for an Intel
25、 Pentium processor do not execute properly on a SPARC processor from Sun Microsystems because 选择一个答案 a. copyrights regarding code cannot be violated b. the assembly mnemonics for the same "opcode" are different in the two processors c. the operation codes understood by the two processors a
26、re different d. the memory of a SPARC CPU is numbered from top to bottom 正确这次提交的分数:8/8。Multiple Choice Quiz 41 分数: 0.9/1 The Visual C+ Memory window displays 选择一个答案 a. the names and values of variables in memory, interpreted in one of several ways b. the contents of memory, interpreted in one of sev
27、eral ways, without the associated variable names c. the names and values of variables in memory, interpreted as 32-bit integers no matter what the variables' types d. the contents of memory, interpreted as 32-bit integers, without the associated variable names 正确这次提交的分数:1/1。 扣除先前的罚分,此次得分 0.9/1。回
28、复历史:#动作回答时间原始分数成绩评分the contents of memory, interpreted as 32-bit integers, without the associated variable names15 年 10 月 8 日的 16:09:0400评分the contents of memory, interpreted in one of several ways, without the associated variable names15 年 10 月 8 日的 16:09:1610.93关闭the contents of memory, interprete
29、d in one of several ways, without the associated variable names15 年 10 月 8 日的 16:20:4410.9Question 2 分数: 1/1 Consider the following code a;int b;int main(int argc, char *argv) int c;int d;./* some code */Which of the following must be true?选择一个答案 a. The value of *d is closer to the valu
30、e of *c than to the value of *a. b. The values of *a and *b are closer to each other than the values of *c and *d. c. The value of &d is closer to the value of &c than to the value of &a. d. The values of &a and &b are closer to each other than the values of &c and &d. 正确
31、这次提交的分数:1/1。回复历史:#动作回答时间原始分数成绩评分The value of &d is closer to the value of &c than to the value of &a.15 年 10 月 8 日的 16:09:21113关闭The value of &d is closer to the value of &c than to the value of &a.15 年 10 月 8 日的 16:20:4411Question 3 分数: 0.9/1 Consider the following code.char
32、 a100;a99 = *(char *) (int) &a0) + 4)If integers are 32 bits wide, which of the following values is equal to a99?选择一个答案 a. a0 + 4 b. the integer stored in the bytes a4, a5, a6 and a7 c. a3 d. a4 正确这次提交的分数:1/1。 扣除先前的罚分,此次得分 0.9/1。回复历史:#动作回答时间原始分数成绩评分a0 + 415 年 10 月 8 日的 16:11:1600评分a415 年 10 月 8
33、日的 16:11:5610.93关闭a415 年 10 月 8 日的 16:20:4410.9Question 4 分数: 1/1 Which of the following statements about alignment within C struct's is true?1. Alignment may cause the allocation of unused space.2. Alignment is required by all modern processors.3. Alignment can help processors access data more
34、efficiently.选择一个答案 a. I only b. I and III only c. II and III only d. I, II, and III 正确这次提交的分数:1/1。回复历史:#动作回答时间原始分数成绩评分I and III only15 年 10 月 8 日的 16:13:38112关闭I and III only15 年 10 月 8 日的 16:20:4411Question 5 分数: 1/1 In C, assuming that an int takes 4 bytes, how many bytes are required to represent
35、 the following array?int a12; 选择一个答案 a. 52 b. 44 c. 12 d. 48 正确这次提交的分数:1/1。回复历史:#动作回答时间原始分数成绩评分4815 年 10 月 8 日的 16:14:36112关闭4815 年 10 月 8 日的 16:20:4411Question 6 分数: 1/1 Given the following declaration and initialization of s, what is the value of the expression s6?char s = "string" 选择一个答
36、案 a. 'n' b. '0' c. 'g' d. an unpredictable value 正确这次提交的分数:1/1。回复历史:#动作回答时间原始分数成绩评分'0'15 年 10 月 8 日的 16:15:05112关闭'0'15 年 10 月 8 日的 16:20:4411Question 7 分数: 0.9/1 In C, assuming that an int takes 4 bytes, if array a is declared as follows and a has the value 0
37、x10000, what is the value of the expression a + 2?int a12; 选择一个答案 a. 0x10004 b. 0x10008 c. 0x10002 d. 8 plus the contents of location 0x10000 正确这次提交的分数:1/1。 扣除先前的罚分,此次得分 0.9/1。回复历史:#动作回答时间原始分数成绩评分8 plus the contents of location 0x1000015 年 10 月 8 日的 16:15:4600评分0x1000815 年 10 月 8 日的 16:15:5810.93关闭0
38、x1000815 年 10 月 8 日的 16:20:4410.9Question 8 分数: 1/1 Given the address of a C struct at runtime, how is the address of a member element in the struct determined? 选择一个答案 a. A linear search is made from the base address of the struct. b. The element name is looked up in a symbol table. c. The struct co
39、nsists of an array of pointers to the elements of the struct. d. A constant offset associated with the member is added to the address. 正确这次提交的分数:1/1。回复历史:#动作回答时间原始分数成绩评分A constant offset associated with the member is added to the address.15 年 10 月 8 日的 16:17:26112关闭A constant offset associated with
40、the member is added to the address.15 年 10 月 8 日的 16:20:4411Question 9 分数: 1/1 In one computer, the bytes with addresses A, A+1, A+2 and A+3 contain the integer 256, and the variable declared with int * a; has the value A. In a different computer, the bytes with addresses B, B+1, B+2 and B+3 also co
41、ntain the integer 256, and the variable declared with int * b has the value B. Which of the following are necessarily true?1. The contents of A+1 are equal to the contents of B+1. 2. The contents of A+1 are equal to the contents of B+2. 3. *a = *b选择一个答案 a. II and III only b. III only c. I only d. I
42、and III only 正确这次提交的分数:1/1。回复历史:#动作回答时间原始分数成绩评分III only15 年 10 月 8 日的 16:18:46112关闭III only15 年 10 月 8 日的 16:20:4411Question 10 分数: 0.8/1 We want the variable factorialfunc to hold the address of the first instruction of the following function:int factorial(int n) if (n = 1) return n;return n * fact
43、orial(n -1);How would we declare the variable? 选择一个答案 a. int (int) * factorialfunc b. int (*factorialfunc)(int); c. we can't: C cannot extract the addresses of instructions. d. factorial() * factorialfunc; Multiple Choice Quiz 51 分数: 1/1 Consider the program given below. #inclu
44、de int callee(void) int count = 5; printf("%d ", (int) &count); return count; int main (int argc, char
45、*argv) int count = 4; count = callee(); printf("%d ", (int) &count); return 0; Which o
46、f the following describes the output of the program? 选择一个答案 a. 5 and 4 are printed, in that order on the same line. b. One integer is printed twice, and its value cannot be determined from the information given. c. Two different integers are printed, and the value of neither can be determ
47、ined from the information given. d. 5 is printed twice on the same line. 正确这次提交的分数:1/1。Question 2 分数: 1/1 What does the following program print? int callee(int * count) count+; return *count;
48、 int main (int argc, char *argv) int count = 4; int retval; retval = callee(&count); printf(&quo
49、t;%d", retval); return 0; 选择一个答案 a. 4 b. 8 c. cannot be determined from the information given. d. 5 正确这次提交的分数:1/1。Question 3 分数: 1/1 What is printed as a result of execution of the following program? #include <stdi
50、o.h> void callee(int * count) (*count)+; int main (int argc, char *argv) int count = 4; callee(&count); &
51、#160; printf("%d", count); return 0; 选择一个答案 a. 8 b. It cannot be determined from the information given. c. 5 d. 4 正确这次提交的分数:1/1。Question 4 分数: 1/1 What does the following program print? void cal
52、lee(int * count) (*count)+;int main (int argc, char *argv) int count = 4; callee(count); printf("%d", count); return 0; 选择一个答案 a. 5 b. 4 c. nothing: it will not compile successfully d. 8 正确这次提交
53、的分数:1/1。Question 5 分数: 1/1 Consider the following function. int factorial(int n) if (n = 1) return n; return n * factorial(n - 1); How many activation records are "popped&quo
54、t; when it is invoked by the expression factorial(4)? 选择一个答案 a. 1 b. 0 c. 5 d. 4 正确这次提交的分数:1/1。Question 6 分数: 1/1 Activation records are organized in stacks because 选择一个答案 a. stacks allow activation records to be pushed and popped in any order. b. stacks are simple enough for t
55、he hardware to manage. c. functions need to access all the variables of the functions that call them. d. they are seldom needed during program execution. 正确这次提交的分数:1/1。Question 7 分数: 1/1 When executing a function callee(), which of the following are true regarding the value of the frame pointer?
56、60;I.It marks the top of the stack frame of the function that invoked callee(). II.It marks the bottom of the stack frame of callee() III.It is the top of the stack. 选择一个答案 a. III only b. II only c. I only d. I and II only 正确这次提交的分数:1/1。Question 8 分数: 1/1 In one computer, the
57、bytes with addresses A, A+1, A+2 and A+3 contain the integer 256, and the variable declared with int * a; has the value A. In a different computer, the bytes with addresses B, B+1, B+2 and B+3 also contain the integer 256, and the variable declared with int * b has the value B. In a computer in which both addresses and integers are 32 bits wide, how many bytes of
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 单体药房采购制度范本
- 上海外国语大学《旅游资源管理》2025-2026学年期末试卷
- 上海海关学院《消费者行为学》2025-2026学年期末试卷
- 沈阳工业大学《初级财务管理》2025-2026学年期末试卷
- 沈阳音乐学院《商务阅读与写作》2025-2026学年期末试卷
- 山西铁道职业技术学院《侵权责任法》2025-2026学年期末试卷
- 上海工会管理职业学院《投资银行学》2025-2026学年期末试卷
- 山西工程科技职业大学《内科护理》2025-2026学年期末试卷
- 上海中侨职业技术大学《仓储与配送管理》2025-2026学年期末试卷
- 电力虚拟电厂运营员虚拟电厂调度考试题目及答案
- 2025年10月自考《思想道德修养与法律基础》模拟试题和答案
- 《生物质灰渣基酸化土壤改良剂》
- 初级注安考试试题及答案(2025年北京市)
- 2025年陕西有色金属控股集团有限责任公司招聘(18人)笔试参考题库附带答案详解
- 高速公路施工安全管理手册
- 制药厂机修考试题及答案
- 出境人员行前安全培训课件
- 现金清分差错管理办法
- 基于Spring Boot的流浪宠物在线救助网站的设计与实现
- 2024年晋城职业技术学院单招《数学》高分题库带答案详解AB卷
- 锡条使用管理办法
评论
0/150
提交评论