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 正确这次提交的分数:8/8。
2、Question 2 分数: 8/8 In C, what is the following binary number in hexadecimal?11010101选择一个答案 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 Wha
3、t 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 2s complement binary format?选择一个答案 a. 01000110 b. 00101100 c. 00101110 d. 00011110 正确这次提交的分数:8/8。Question 6 分数: 8/8
4、How is -10 (decimal) represented in an 8-bit 2s complement binary format?选择一个答案 a. 11111010 b. 11110101 c. 10001010 d. 11110110 正确这次提交的分数: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.
5、(ptr | 3) = 0III. (ptr % 4) = 0选择一个答案 a. III only b. 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 an
6、d execution continues. c. An exception-handler 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 he
7、xadecimal c. the mantissa is raised to the 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 nu
8、mbers.II. A 32-bit float only approximates 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 t
9、he following numerical operations is most 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-p
10、oint computation results in an overflow?选择一个答案 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
11、 Quiz 31 分数: 7/7 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、回复历史:#动作回答时间原始分数成绩1评分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 instr
13、uction, the program 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
14、 critical variable 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 正确这次提交的分
15、数:7/7。Question 4 分数: 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
16、 memory window of Visual C+, we found that a certain set of contiguous memory locations contained the integer 0xC605CD623A8365000000. What could these memory locations hold?1. the integer 0xC605CD623A83650000002. a string3. a CPU instruction选择一个答案 a. I only b. I, II, and III c. I and II only d. III
17、only 正确这次提交的分数:8/8。Question 6 分数: 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 正确这次提交的
18、分数:8/8。Question 7 分数: 8/8 A jump 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 分
19、数: 8/8 The machine code generated 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 正
20、确这次提交的分数:8/8。Question 9 分数: 8/8 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
21、, and III b. I only c. I and III 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 so
22、me CPU instructions faster 选择一个答案 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 b
23、reakpoint enabled on that line. 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
24、a breakpoint? I.Placing the mouse 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 c
25、ompiled for an Intel 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 proc
26、essors are 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 on
27、e of several 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/
28、1。回复历史:#动作回答时间原始分数成绩1评分the contents of memory, interpreted as 32-bit integers, without the associated variable names15 年 10 月 8 日的 16:09:04002评分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, interpreted in one of several ways, without the associated variable names15 年 10 月 8 日的 16:20:4410.9Question 2 分数: 1/1 Consider the following code fragment.int a;int b;int main(int argc, char *argv) int c;int d;./* some code */Which of the following must be true?选择一个答案 a. The
copyright@ 2008-2023 冰点文库 网站版权所有
经营许可证编号:鄂ICP备19020893号-2