分享
分销 收藏 举报 申诉 / 89
播放页_导航下方通栏广告

类型系统级编程选择题.doc

  • 上传人:二***
  • 文档编号:4587641
  • 上传时间:2024-09-30
  • 格式:DOC
  • 页数:89
  • 大小:1.31MB
  • 下载积分:5 金币
  • 播放页_非在线预览资源立即下载上方广告
    配套讲稿:

    如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。

    特殊限制:

    部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。

    关 键  词:
    完整 word 系统 编程 选择题
    资源描述:
    (完整word版)系统级编程选择题(2013) Multiple Choice Quiz 1 分数: 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 execution 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. II and III only b. none c. I and II only d. II only 正确: B Question 2 分数: 1 Which of the 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. III only b. I, II, and III. c. I and III only d. II and III only 正确: D Question 3 分数: 1 Which of the following Visual C++ objects are contained within a "Project"?  I.Files      II.Visual C++ Solutions          III.Flow charts 选择一个答案 a. I, II and III b. I only c. II only d. II and III only 正确:b Question 4 分数: 1 Compared to a sequence of machine code instructions, a fragment of C code 选择一个答案 a. does not engage any transistors during its execution b. is the native way to program most computers c. describes the actions of the computer, not just of the CPU d. may describe the same algorithm 正确:D Question 5 分数: 1 Integrated programming environments make it difficult to mix and match tools from different sources. This is 选择一个答案 a. bad, because all the tools will then have the same user interface b. good, because tools from different sources cannot be made to interact with each other c. good, because it ensures compilation is not done incrementally by accident d. bad, because no single vendor is likely to be the source of all the best tools 正确:D 这次提交的分数:1/1。 Question 6 分数: 1 When using a debugger to find the cause of a program's incorrect behavior, 选择一个答案 a. it is fastest to start by stopping the debugger long before the behavior appears b. the program is usually executed to the point at which the behavior occurs and then executed backwards to find the cause c. it is often necessary to start the program multiple times under the debugger d. the faulty code fragment must first be identified 正确:C 这次提交的分数:1/1。 Question 7 分数: 1 In Visual C++, a Win32 Console Application is 选择一个答案 a. the status window of the Visual C++ environment b. a program that is able to control the operating system of a windows computer c. built by using sophisticated "Application Wizards" d. the simplest type of application Visual C++ can generate 正确:D 这次提交的分数:1/1。 Question 8 分数: 1 Which of the following is able to describe a computation at the highest level of abstraction?   选择一个答案 a. machine code b. C code c. C++ code d. logic Gates 正确:C 这次提交的分数:1/1。 Multiple Choice Quiz 2 分数: 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 numbered 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 正确:B 这次提交的分数:1/1。 Question 2 分数: 1 A CPU register is a word of CPU memory that 选择一个答案 a. houses a critical variable for the duration of the execution of a program b. is automatically loaded when a CPU instruction refers to a word of normal memory c. records the results of periodic CPU diagnostics d. is explicitly loaded and unloaded from normal memory by compiler-generated instructions 正确:D 这次提交的分数:1/1。 Question 3 分数: 1 A jump instruction 选择一个答案 a. unconditionally sets the program counter to its operand b. changes a pointer to point to the next element of an array c. increases the program counter d. changes the program counter only if its operand is equal to zero 正确:A 这次提交的分数:1/1。 Question 4 分数: 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 enabled on the line preceding that line. 选择一个答案 a. I and III only b. I only c. none d. I and II only 正确:C 这次提交的分数:1/1。 Question 5 分数: 1 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 正确:B 这次提交的分数:1/1。 Question 6 分数: 1 A branch instruction 选择一个答案 a. unconditionally sets the program counter to its operand b. sets the program counter to one of many possible values c. sets the program counter to one of two possible values d. increases the program counter by a fixed amount 正确:C 这次提交的分数:1/1。 Question 7 分数: 1 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 II only d. I and III only 正确:D 这次提交的分数:1/1。 Question 8 分数: 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; i += a[i++]); 选择一个答案 a. I only b. I and II only c. II only d. I, II, and III 正确:A 这次提交的分数:1/1。 Question 9 分数: 1 The machine code generated from source code by a compiler 选择一个答案 a. does not preserve all the information given in the source code b. associates variable values with their names c. executes more quickly than the source code d. can be easily inspected to check the correctness of the compiler 正确:A 这次提交的分数:1/1。 Question 10 分数: 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 memory locations hold? 1. the integer 0xC605CD623A8365000000 2. a string 3. a CPU instruction 选择一个答案 a. I and II only b. I only c. III only d. I, II, and III 正确:D 这次提交的分数:1/1。 Question 11 分数: 1 Immediately after the CPU executes an instruction that is neither a branch nor a jump instruction, the program counter 选择一个答案 a. is incremented by one b. remains unchanged c. has a value that cannot be determined without further information d. is incremented to point to the following instruction 正确:D 这次提交的分数:1/1。 Question 12 分数: 1 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 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. III only b. I, II, and III c. I and III only d. II and III only 正确:C 这次提交的分数:1/1。 Question 13 分数: 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. II and III only b. II only c. III only d. I, II, and III 正确:A 这次提交的分数:1/1。 Multiple Choice Quiz 3 分数: 1/1 In C, using default floating point settings, what happens when a floating-point computation results in an overflow?  选择一个答案 a. A special value "infinity" is computed, testable with _finite(). b. Program execution is halted. c. An exception is raised unless disabled by calling _controlfp(). d. An erroneous value is computed and execution continues. 正确:A 这次提交的分数:1/1。 回复历史: Question 2 分数: 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 represent any rational real number but not irrationals. 选择一个答案 a. I and II only b. II only c. I only d. I and III only 正确:C 这次提交的分数:1/1。 回复历史: Question 3 分数: 1/1 Which of the following could be represented by one bit of information?  选择一个答案 a. an ASCII character b. the current channel of a television receiver c. the color of a single pixel on a true-color computer display d. the position of a light switch 正确:D 这次提交的分数:1/1。 回复历史: Question 4 分数: 1/1 What is the value of the following C expression? 0x1234 ^ 0x5432 选择一个答案 a. 0x1030 b. 0x5636 c. 0x4606 d. 0x5434 正确:C(做异或运算) 这次提交的分数:1/1。 回复历史: Question 5 分数: 1/1 What is the purpose of the exponent in floating point numbers?  选择一个答案 a. the mantissa is raised to the power of the exponent b. to indicate where the decimal or binary point should be c. to specify the base as binary, octal, or hexadecimal d. to specify the superscript 正确:B 这次提交的分数:1/1。 回复历史: Question 6 分数: 1/1 How is -10 (decimal) represented in an 8-bit 2's complement binary format? 选择一个答案 a. 11110110 b. 11110101 c. 11111010 d. 10001010 正确:A(取反加一) 这次提交的分数:1/1。 回复历史: Question 7 分数: 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 addition d. Floating-point multiplication 正确:C 这次提交的分数:1/1。 回复历史: Question 8 分数: 1/1 In C, what is the following binary number in hexadecimal? 11010101 选择一个答案 a. 0xB5 b. 0xD5 c. 0xAB d. 0x5D 正确:B 这次提交的分数:1/1。 回复历史: Question 9 分数: 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) == 0 II. (ptr | 3) == 0 III. (ptr % 4) == 0 选择一个答案 a. II only b. I and III only c. III only d. I only 正确:B 这次提交的分数:1/1。 回复历史: Question 10 分数: 1/1 What is the value of the following C expression? 0x1234 & 0x5432 选择一个答案 a. 0x1030 b. 0x1111 c. 0x5636 d. 0x6666 正确:A(与运算) 这次提交的分数:1/1。 回复历史: Question 11 分数: 1/1 How is 46 (decimal) represented in an 8-bit 2's complement binary format? 选择一个答案 a. 00101110 b. 00011110 c. 00101100 d. 01000110 正确:A(正数的补码是它本身) 这次提交的分数:1/1。 回复历史: Question 12 分数: 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. Execution is terminated. c. The correct value is coerced to a floating point number. d. An exception-handler is called with the two operands as parameters. 正确:A 这次提交的分数:1/1。 回复历史: Multiple Choice Quiz 4 1 分数: 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 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. I and III only b. II and III only c. I only d. III only 正确:D 这次提交的分数:1/1。 回复历史: Question 2 分数: 1/1 Given the following declaration and initialization of s, what is the value of the expression s[6]? char s[] = "string"; 选择一个答案 a. '\n' b. 'g' c. an unpredictable value d. '\0' 正确:D 这次提交的分数:1/1。 回复历史: Question 3 分数: 1/1 The Visual C++ Memory window displays 选择一个答案 a. the names and values of variables in memory, interpreted as 32-bit integers no matter what the variables' types b. the names and values of variables in memory, interpreted in one of several ways c. the contents of memory, interpreted as 32-bit integers, without the associated variable names d. the contents of memory, interpreted in one of several ways, without the associated variable names 正确:D 这次提交的分数:1/1。 回复历史: Question 4 分数: 1/1 In C, assuming that an int takes 4 bytes, how many bytes are required to represent the following array? int a[12]; 选择一个答案 a. 12 b. 52 c. 44 d. 48 正确:D 这次提交的分数:1/1。 回复历史: Question 5 分数: 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 efficiently. 选择一个答案 a. I, II, and III b. II and III only c. I only d. I and III only 正确:D 这次提交的分数:1/1。 回复历史: Question 6 分数: 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 constant offset associated with the member is added to the address. b. A linear search is made from the base address of the struct. c. The struct consists of an array of pointers to the elements of the struct. d. The element name is looked up in a symbol table. 正确:A 这次提交的分数:1/1。 回复历史: Question 7 分数: 1/1 Consider the following code. char a[100]; a[99] = *((char *) (((int) &a[0]) + 4)) If integers are 32 bits wide, which of the following values is equal to a[99]? 选择一个答案 a. the integer stored in the bytes a[4], a[5], a[6] and a[7] b. a[4] c. a[0] + 4 d. a[3] 正确:B 这次提交的分数:1/1。 回复历史: Question 8 分数: 1/1 In C, assuming that an int takes 4 bytes, if array a is declared as follows and a has the value 0x10000, what is the value of the expression a + 2? int a[12]; 选择一个答案 a. 8 plus the contents of location 0x10000 b. 0x10004 c. 0x10002 d. 0x10008 正确:D 这次提交的分数:1/1。 回复历史: Question 9 分数: 1/1 We want the variable factorialfunc to hold the address of the first instruction of the following function: int factorial(int n) {
    展开阅读全文
    提示  咨信网温馨提示:
    1、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
    2、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,个别因单元格分列造成显示页码不一将协商解决,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
    3、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
    4、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前可先查看【教您几个在下载文档中可以更好的避免被坑】。
    5、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
    6、文档遇到问题,请及时联系平台进行协调解决,联系【微信客服】、【QQ客服】,若有其他问题请点击或扫码反馈【服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【版权申诉】”,意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:0574-28810668;投诉电话:18658249818。

    开通VIP折扣优惠下载文档

    自信AI创作助手
    关于本文
    本文标题:系统级编程选择题.doc
    链接地址:https://www.zixin.com.cn/doc/4587641.html
    页脚通栏广告

    Copyright ©2010-2026   All Rights Reserved  宁波自信网络信息技术有限公司 版权所有   |  客服电话:0574-28810668    微信客服:咨信网客服    投诉电话:18658249818   

    违法和不良信息举报邮箱:help@zixin.com.cn    文档合作和网站合作邮箱:fuwu@zixin.com.cn    意见反馈和侵权处理邮箱:1219186828@qq.com   | 证照中心

    12321jubao.png12321网络举报中心 电话:010-12321  jubao.png中国互联网举报中心 电话:12377   gongan.png浙公网安备33021202000488号  icp.png浙ICP备2021020529号-1 浙B2-20240490   


    关注我们 :微信公众号  抖音  微博  LOFTER               

    自信网络  |  ZixinNetwork