Quiz 1

Question1
Compared to a sequence of machine code instructions, a fragment of C code
a. describes the actions of the computer, not just of the CPU 
b. does not engage any transistors during its execution 
c. may describe the same algorithm 正确
d. is the native way to program most computers 
 
Question2
Which of the following is able to describe a computation at the highest level of bstraction?
a. machine code 
b. logic Gates 
c. C++ code 正确
d. C code 
 
Question3
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. I, II, and III
b. III only 
c. II and III only 正确
d. I and III only 
 
Question4
Integrated programming environments 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. bad, because all the tools will then have the same user interface 
c. good, because tools from different sources cannot be made to interact with each other 
d. bad, because no single vendor is likely to be the source of all the best tools 正确
 
Question5
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 
 
Question6
Which of t he following Visual C++ objects are contained within a "Project"? 
 I.Files      II.Visual C++ Solutions          III.Flow charts  
a. II only 
b. I, II and III 
c. I only 正确
d. II and III only 
 
Question7
When using a debugger to find the cause of a program's incorrect behavior, 
a. the faulty code fragment must first be identified 
b. it is fastest to start by stopping the debugger long before the behavior appears 
c. it is often necessary to start the program multiple times under the debugger 正确
d. the program is usually executed to the point at which the behavior occurs and then executed backwards to find the cause 
 
Question8
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. the status window of the Visual C++ environment 
 

转载于:https://www.cnblogs.com/FOTF/archive/2012/09/11/2679832.html

Multiple-Choice Quiz 1 aaaba aadda 1.Which method must exist in every Java application? (a) main (b) paint (c) begin (d) init 2.Which of the following is the string concatenation operator in Java? (a) + (b) ^ (c) & (d) ++ 3.Which of the following statements is (are) true about the use of an asterisk (*) in a Java import statement? I. It does not incur run-time overhead. II. It can be used to import multiple packages with a single statement. III. It can be used to import multiple classes with a single statement. (a) I and III only (b) III only (c) I only (d) I, II, and III 4.A difference between the methods print and println of the class java.io.PrintWriter is that (a) print inserts a new line at the beginning of its output, but println does not (b) println appends a new line to the end of its output, but print does not (c) println inserts a new line at the beginning of its output, but print does not (d) print appends a new line to the end of its output, but println does not 5.What will be output when the following Java program segment is executed? int x = 5; int y = 2; System.out.println(x + y);//这种运算是顺序进行的,试试System.out.println(x + y + “1”); (a) 7 (b) 5 2 (c) 5+2 (d) 52 6.What is the right way to handle abnormalities in input on Java? (a) By handling these problems by providing exception handlers (b) By writing while loops to guard against bad input (c) By using the class FileFilter which gracefully filters out bad input data (d) By always specifying the throws clause in every method header where file I/O is performed 7.All Java exception classes are derived from the class (a) java.lang.Throwable (b) java.lang.Error (c) java.io.IOException (d) java.lang.RuntimeException
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值