C++面向对象程序设计考试题库.doc
《C++面向对象程序设计考试题库.doc》由会员分享,可在线阅读,更多相关《C++面向对象程序设计考试题库.doc(149页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、SHORT ANSWER1. A set of instructions that the computer will follow is called a _.Answer: program2. The collection of programs used by the computer is known as _.Answer: software3. Computers that are interconnected are known as a _.Answer: network4. A digit that can hold a zero or a one is known as a
2、 _.Answer: bit5. List at least two input devices _ _.Answer: keyboard, mouse, network card, file6. List at least two output devices _ _.Answer: screen, printer, file, network card7. A variable that can hold a whole number is called a(n) _.Answer: integer8. What punctuation signifies the end of a C+
3、statement? _Answer: A semicolon.9. A mistake in a computer program is called a _.Answer: bug10. A _ is the program that translates a program written in C+ into machine language.Answer: compiler11. Errors in a program can be classified into three types, list themAnswer: Syntax, logic,run-time12. What
4、 does the following statement in C+ print to the screen?cout “Hello studentsn”;Answer: Hello students.13. A mistake that is a direct violation of the syntax rules will generate a compiler _.Answer: error14. If your program compiles and runs, but gives an incorrect output, this is known as a _ error.
5、Answer: logic15. The part of the computer that controls and executes programs is called the _.Answer: CPUMULTIPLE CHOICE1. Who was the programmer for Charles Babbages analytical engine?a. Grace Hopperb. Ada Lovelacec. Lord Bryand. Walter Savitch Answer: B2. An algorithm isa. The inputs and outputs o
6、f a programb. The part of the computer that does the processingc. A finite set of steps to solve a problemd. A complete computer program Answer: C3. A memory address isa. Where a variable is storedb. Where the computer is locatedc. A step in the program.d. Where the CPU is stored. Answer: A4. A comp
7、uter that is normally used by only one person at a time is called a a. Serverb. Mainframec. Personal Computerd. Network Answer: C5. The physical machines that make up a computer is called the a. Softwareb. Networkc. Devicesd. CPUe. Hardware Answer: E6. Which of the following is not a phase of the pr
8、ogram-design process?a. Problem-solvingb. Implementationc. Marketing the final program Answer: C7. Which of the following is not part of the Software Life Cycle?a. Analysisb. Designc. Data Entryd. Implementatione. Testing Answer: C8. From which language did C+ directly evolve?a. Ab. Adac. Cd. C+e. C
9、- Answer: C9. What does the following line of code display to the screen?cout “This is the computern programming bookn”;a. This is the computern programming bookb. This is the computerc. Nothingd. This is the computer programming book Answer: D10. C+ statements end with aa. Periodb. Commac. Semicolo
10、nd. Nothing Answer: C11. Which of the following is not an example of a program bug?a. Run-time errorb. Operator errorc. Syntax errord. Logic error Answer:B12. What does the following code print to the screen?cout “hello”;a. Hellob. helloc. HELLOd. Nothing Answer: B13. The set of instructions that a
11、computer will follow is known as:a. Hardwareb. Algorithmc. Programd. CPU Answer: C14. The anagram CPU stands fora. Computer Programming Unitb. Central Processing Unitc. Central Program Userd. Computer Paper User Answer: B15. The output of the compiler is calleda. The programb. Source codec. Linked c
12、oded. Object code Answer:D16. The term OS stands fora. Operating Systemb. Oscillating Systemc. Operations Services d. Nothing Answer: A17. Who designed the first programmable computer?a. IBMb. Microsoftc. Inteld. Babbagee. Dell Answer: D18. A finite sequence of precise instructions that leads to a p
13、roblem solution isa. A programb. The CPUc. A List of Inputs and Outputsd. An Algorithm Answer: D19. Who developed C+?a. Bjarne Stroustrupb. Ken Thompsonc. Charles Babbaged. Ada Lovelace Answer: A20. One of the biggest difference between C and C+ is:a. C is object-orientedb. C+ is object-orientedc. A
14、ll C+ programs are also C programsd. C only runs on UNIX computers Answer: B21. int number; a. is an output statementb. is an input statementc. is a variable declarationd. is a program Answer: C22. cout number;A is an output statementB is an input statementC is a variable declarationD is a program A
15、nswer: B23. What does the following print to the screen?cout “Hello Students/n”;a. Hello Studentsb. hello Studentsc. HELLO STUDENTSd. Hello Students/n Answer:D24. #include a. is a variable declarationb. an executable statementc. an include directived. illegal code Answer: C25. A byte consists of how
16、 many bits?a. 6 b. 7c. 8d. 9e. 10 Answer: C26. What is wrong with the following statement?cout “Hello to everyonen”a. cout should be countb. missing a semicolonc. missing a “d. missing a ( Answer: B27. What is wrong with the following statementPage: 528 and 27 are the samePage: 527 and 28 are differ
17、ent, 27 is missing a semicolon, while 28 is missing the closing double quote.?cout “Hello, my name is Billn”;Answer: FALSE3. You should write your program before you write the algorithm.Answer: FALSE4. It is considered better style to put the braces () on separate lines.Answer: TRUE5. The compiler w
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- C+ 面向 对象 程序设计 考试 题库
限制150内