系统级编程选择题(56页).doc

上传人:1595****071 文档编号:37360706 上传时间:2022-08-31 格式:DOC 页数:67 大小:2.28MB
返回 下载 相关 举报
系统级编程选择题(56页).doc_第1页
第1页 / 共67页
系统级编程选择题(56页).doc_第2页
第2页 / 共67页
点击查看更多>>
资源描述

《系统级编程选择题(56页).doc》由会员分享,可在线阅读,更多相关《系统级编程选择题(56页).doc(67页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、-系统级编程选择题-第 67 页Question分数: 1 Which of the following is able to describe a computation at the highest level of abstraction?选择一个答案 a. C+ code b. logic Gates c. machine code d. C code 正确这次提交的分数:1/1。Question 2 分数: 1 Which of t he following Visual C+ objects are contained within a Project? I.Files II.Vi

2、sual C+ Solutions III.Flow charts选择一个答案 a. II and III only b. I, II and III c. II only d. I only 正确这次提交的分数:1/1。Question 3 分数: 1 When using a debugger to find the cause of a programs incorrect behavior,选择一个答案 a. it is often necessary to start the program multiple times under the debugger b. the fault

3、y code fragment must first be identified c. it is fastest to start by stopping the debugger long before the behavior appears d. the program is usually executed to the point at which the behavior occurs and then executed backwards to find the cause 正确这次提交的分数:1/1。Question 4 分数: 1 Compared to a sequenc

4、e of machine code instructions, a fragment of C code选择一个答案 a. describes the actions of the computer, not just of the CPU b. may describe the same algorithm c. does not engage any transistors during its execution d. is the native way to program most computers 错误这次提交的分数:0/1。Question 5 分数: 1 Which of t

5、he following does a debugger do? 1. Analyze the source code to find programming errors. 2. Decode machine code generated by a compiler. 3. Stop execution of a program.选择一个答案 a. I and III only b. III only c. II and III only d. I, II, and III. 错误这次提交的分数:0/1。Question 6 分数: 1 Integrated programming envi

6、ronments make it difficult to mix and match tools from different sources. This is选择一个答案 a. good, because it ensures compilation is not done incrementally by accident b. good, because tools from different sources cannot be made to interact with each other c. bad, because all the tools will then have

7、the same user interface d. bad, because no single vendor is likely to be the source of all the best tools 正确这次提交的分数:1/1。Question 7 分数: 1 Consider the following fragment of C+ source code. String msg; unsigned int x; int y; cin msg x y; cout x + y; Which of the following is (are) true regarding execu

8、tion of the segment? 1. The input statement will always take the same amount of time to execute. 2. The output statement will always be executed immediately after the input statement. 3. If x and y are both positive, an integer greater than both will be printed.选择一个答案 a. none b. II only c. I and II

9、only d. II and III only 正确这次提交的分数:1/1。Question 8 分数: 1 In Visual C+, a Win32 Console Application is选择一个答案 a. the simplest type of application Visual C+ can generate b. built by using sophisticated Application Wizards c. a program that is able to control the operating system of a windows computer d.

10、the status window of the Visual C+ environment 正确这次提交的分数:1/1。Question 1 分数: 1/1 Which of the following numerical operations is most likely to lead to loss of precision?选择一个答案 a. Integer addition b. Integer multiplication c. Floating-point multiplication d. Floating-point addition 正确这次提交的分数:1/1。Quest

11、ion 2 分数: 0/1 What is the value of the following C expression?0x1234 0x5432选择一个答案 a. 0x1030 b. 0x5636 c. 0x4606 d. 0x5434 错误这次提交的分数:0/1。Question 3 分数: 1/1 How is -10 (decimal) represented in an 8-bit 2s complement binary format?选择一个答案 a. 11110110 b. 11110101 c. 11111010 d. 10001010 正确这次提交的分数:1/1。Que

12、stion 4 分数: 1/1 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 approximates decimal fractions, but a 64-bit double represents them exactly.III. Floating-point numbers can repr

13、esent any rational real number but not irrationals.选择一个答案 a. I and III only b. I and II only c. I only d. II only 正确这次提交的分数:1/1。Question 5 分数: 1/1 What happens in a C program when an addition would cause integer overflow?选择一个答案 a. An incorrect result is produced and execution continues. b. An except

14、ion-handler is called with the two operands as parameters. c. The correct value is coerced to a floating point number. d. Execution is terminated. 正确这次提交的分数:1/1。Question 6 分数: 1/1 Which of the following could be represented by one bit of information?选择一个答案 a. the color of a single pixel on a true-co

15、lor computer display b. the position of a light switch c. the current channel of a television receiver d. an ASCII character 正确这次提交的分数:1/1。Question 7 分数: 1/1 What is the purpose of the exponent in floating point numbers?选择一个答案 a. to specify the base as binary, octal, or hexadecimal b. the mantissa i

16、s raised to the power of the exponent c. to indicate where the decimal or binary point should be d. to specify the superscript 正确这次提交的分数:1/1。Question 8 分数: 1/1 In C, using default floating point settings, what happens when a floating-point computation results in an overflow?选择一个答案 a. An erroneous va

17、lue is computed and execution continues. b. Program execution is halted. c. An exception is raised unless disabled by calling _controlfp(). d. A special value infinity is computed, testable with _finite(). 正确这次提交的分数:1/1。Question 9 分数: 1/1 What is the value of the following C expression?0x1234 & 0x54

18、32选择一个答案 a. 0x1030 b. 0x1111 c. 0x5636 d. 0x6666 正确这次提交的分数:1/1。Question 10 分数: 1/1 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. II only b. I only c. I and III only d

19、. III only 正确这次提交的分数:1/1。Question 11 分数: 1/1 In C, what is the following binary number in hexadecimal?11010101选择一个答案 a. 0xB5 b. 0xD5 c. 0x5D d. 0xAB 正确这次提交的分数:1/1。Question 12 分数: 1/1 How is 46 (decimal) represented in an 8-bit 2s complement binary format?选择一个答案 a. 00101110 b. 00011110 c. 01000110 d.

20、 00101100 正确Question 1 分数: 1/1 The program counter contains选择一个答案 a. the amount of memory a program is currently using b. the address of the CPU instruction that is about to be fetched c. the number of times a program has been executed d. the number of CPU instructions a program has executed so far

21、正确这次提交的分数:1/1。Question 2 分数: 1/1 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 选择一个答案 a. I, II, and III b. I

22、II only c. II only d. II and III only 正确这次提交的分数:1/1。Question 3 分数: 1/1 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. III.There is a breakpoint

23、 enabled on the line preceding that line.选择一个答案 a. I and III only b. none c. I only d. I and II only 正确这次提交的分数:1/1。Question 4 分数: 1/1 Programs compiled for an Intel Pentium processor do not execute properly on a SPARC processor from Sun Microsystems because 选择一个答案 a. the memory of a SPARC CPU is num

24、bered from top to bottom b. the operation codes understood by the two processors are different c. the assembly mnemonics for the same opcode are different in the two processors d. copyrights regarding code cannot be violated 正确这次提交的分数:1/1。Question 5 分数: 1/1 Within Visual C+, which of the following w

25、ill reveal the value of a variable when the program is stopped at 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. I and III only b. I, II, and III c. III on

26、ly d. II and III only 正确这次提交的分数:1/1。Question 6 分数: 1/1 Immediately after the CPU executes an instruction that is neither a branch nor a jump instruction, the program counter选择一个答案 a. remains unchanged b. is incremented to point to the following instruction c. is incremented by one d. has a value tha

27、t cannot be determined without further information 正确这次提交的分数:1/1。Question 7 分数: 1/1 A CPU register is a word of CPU memory that 选择一个答案 a. is explicitly loaded and unloaded from normal memory by compiler-generated instructions b. records the results of periodic CPU diagnostics c. is automatically loa

28、ded when a CPU instruction refers to a word of normal memory d. houses a critical variable for the duration of the execution of a program 正确这次提交的分数:1/1。Question 8 分数: 1/1 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

29、; i += ai+);选择一个答案 a. I only b. I, II, and III c. I and II only d. II only 正确这次提交的分数:1/1。Question 9 分数: 0/1 Suppose that, using a tool such as the memory window of Visual C+, we found that a certain set of contiguous memory locations contained the integer 0xC605CD623A8365000000. What could these mem

30、ory locations hold?1. the integer 0xC605CD623A83650000002. a string3. a CPU instruction选择一个答案 a. III only b. I and II only c. I only d. I, II, and III 错误这次提交的分数:0/1。Question 10 分数: 1/1 A branch instruction 选择一个答案 a. sets the program counter to one of two possible values b. unconditionally sets the p

31、rogram counter to its operand c. increases the program counter by a fixed amount d. sets the program counter to one of many possible values 正确这次提交的分数:1/1。Question 11 分数: 1/1 A jump instruction 选择一个答案 a. unconditionally sets the program counter to its operand b. changes the program counter only if it

32、s operand is equal to zero c. changes a pointer to point to the next element of an array d. increases the program counter 正确这次提交的分数:1/1。Question 12 分数: 1/1 The machine code generated from source code by a compiler 选择一个答案 a. associates variable values with their names b. can be easily inspected to ch

33、eck the correctness of the compiler c. does not preserve all the information given in the source code d. executes more quickly than the source code 正确这次提交的分数:1/1。Question 13 分数: 1/1 Which of the following are true of the effect that optimizations have on the machine code generated by compilers? I.Th

34、e 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 and II only b. I and III only c. I, II, and III d. I only 正确这次提交的分数:1/1。Question 1 分数: 1/1 In C, assuming that an int takes 4 bytes, if array a is declar

35、ed as follows and a has the value 0x10000, what is the value of the expression a + 2?int a12; 选择一个答案 a. 8 plus the contents of location 0x10000 b. 0x10002 c. 0x10004 d. 0x10008 正确这次提交的分数:1/1。回复历史: Question 2 分数: 1/1 The Visual C+ Memory window displays 选择一个答案 a. the names and values of variables in

36、memory, interpreted in one of several ways b. the names and values of variables in memory, interpreted as 32-bit integers no matter what the variables types c. the contents of memory, interpreted as 32-bit integers, without the associated variable names d. the contents of memory, interpreted in one

37、of several ways, without the associated variable names 正确这次提交的分数:1/1。回复历史: Question 3 分数: 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 value of &d is closer to the value of &c than to

38、 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. 正确这次提交的分数:1/1。回复历史: Question 4 分数: 1/1 Consid

39、er the following code.char 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. a4 c. the integer stored in the bytes a4, a5, a6 and a7 d. a3 正确这次提交的分数:1/1。回复历史: Question 5 分数: 1/1 Which of the following statements about

40、alignment within C structs 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 efficiently.选择一个答案 a. I, II, and III b. I only c. II and III only d. I and III only 正确这次提交的分数:1/1。回复历史: Questio

41、n 6 分数: 1/1 In C, assuming that an int takes 4 bytes, how many bytes are required to represent the following array?int a12; 选择一个答案 a. 44 b. 52 c. 12 d. 48 正确这次提交的分数:1/1。回复历史: Question 7 分数: 1/1 Given the following declaration and initialization of s, what is the value of the expression s6?char s = s

42、tring; 选择一个答案 a. an unpredictable value b. g c. n d. 0 正确这次提交的分数:1/1。回复历史: Question 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. The struct consists of an array of pointers to the elements of the struct. b. A linear

43、search is made from the base address of the struct. c. A constant offset associated with the member is added to the address. d. The element name is looked up in a symbol table. 正确这次提交的分数:1/1。回复历史: Question 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 contain the integer 256, and the variable declared with int * b has the value B. Which of the following

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育专区 > 单元课程

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁