?? ssd6-choice.txt
字號:
View Assessment Result
Family Name: Li
Given Name: Qin
Login: nwpu053816
E-mail: lqw3816@163.com
Status: Enrolled
Assessment Name: Multiple-Choice Quiz 1
Instance: 1
Section: NWPU-SSD6-6
During: Fall/Autumn 2007
Section Status: Active
For course: System-Level Programming
(SSD6)
Corresponding to: SSD6
At: Software College of Northwestern Polytechnical University
--------------------------------------------------------------------------------
Your performance was as follows:
You took 65 minutes on this assessment from Thu Oct 25 09:14:05 UTC+0800 2007 to Thu Oct 25 10:18:20 UTC+0800 2007.
Total score: 42.86
1.
Which of the following Visual C++ objects are contained within a "Project"?
Files
Visual C++ Solutions
Flow charts
(a) II only
(b) I, II and III
(c) I only
(d) II and III only
Correct answer is (c)
Your score on this question is: 0.00
Feedback:
See section 1.1.4 of the course notes.
--------------------------------------------------------------------------------
2.
Integrated programming environments make it difficult to mix and match tools from different sources. This is
(a) good, because tools from different sources cannot be made to interact with each other
(b) good, because it ensures compilation is not done incrementally by accident
(c) bad, because all the tools will then have the same user interface
(d) bad, because no single vendor is likely to be the source of all the best tools
Correct answer is (d)
Your score on this question is: 0.00
Feedback:
See section 1.1.4 of the course notes.
--------------------------------------------------------------------------------
3.
When debugging using Visual C++, which of the following are possible through the Watch window?
The program's execution can be stopped.
The value of an arbitrary C expression can be calculated.
The value of a program variable can be set.
(a) II only
(b) II and III only
(c) III only
(d) I, II, and III.
Correct answer is (b)
Your score on this question is: 0.00
Feedback:
See section 1.2.3 of the course notes.
--------------------------------------------------------------------------------
4.
When using a debugger to find the cause of a program's incorrect behavior,
(a) it is often necessary to start the program multiple times under the debugger
(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 fastest to start by stopping the debugger long before the behavior appears
(d) the faulty code fragment must first be identified
Correct answer is (a)
Your score on this question is: 0.00
Feedback:
See section 1.2.4 of the course notes.
--------------------------------------------------------------------------------
5.
Consider the following program.
int i;
int * jp = &i;
int main(int i, char * argv[]) {
printf("%d %d\n", (int) &i, (int) jp);
}
Which of the following describes what it prints?
(a) nothing: it will not compile because it is ambiguous
(b) two integers that are exactly the same
(c) two very different integers
(d) two values, one 4 greater than the other
Correct answer is (c)
Your score on this question is: 0.00
Feedback:
See section 1.4.1 of the course notes.
--------------------------------------------------------------------------------
6.
What is printed as a result of execution of the following program?
#include <stdio.h>
void callee(int * count) {
(*count)++;
}
int main (int argc, char *argv[]) {
int count = 4;
callee(&count);
printf("%d", count);
return 0;
}
(a) 4
(b) It cannot be determined from the information given.
(c) 8
(d) 5
Correct answer is (d)
Your score on this question is: 7.14
Feedback:
See section 1.4.1 of the course notes.
--------------------------------------------------------------------------------
7.
What does the following program print?
void callee(int * count) {
(*count)++;
}
int main (int argc, char *argv[]) {
int count = 4;
callee(count);
printf("%d", count);
return 0;
}
(a) 5
(b) nothing: it will not compile successfully
(c) 8
(d) 4
Correct answer is (b)
Your score on this question is: 7.14
Feedback:
See section 1.4.1 of the course notes.
--------------------------------------------------------------------------------
8.
Consider the following program.
int i;
int j = 1;
int callee(int number) {
int plusone;
plusone = number + 1;
return plusone;
}
int main (int argc, char *argv[]) {
if (j == 1) return callee(i);
return j;
}
Which of the following are allocated in the activation record immediately after the function callee() is invoked?
(a) plusone and number only.
(b) i only.
(c) plusone only.
(d) i, j and number only.
Correct answer is (a)
Your score on this question is: 0.00
Feedback:
See section 1.4.2 of the course notes.
--------------------------------------------------------------------------------
9.
The Visual C++ Memory window displays
(a) the contents of memory, interpreted as 32-bit integers, without the associated variable names
(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 in one of several ways, without the associated variable names
(d) the names and values of variables in memory, interpreted in one of several ways
Correct answer is (c)
Your score on this question is: 7.14
Feedback:
See section 1.3.3 of the course notes.
--------------------------------------------------------------------------------
10.
In a computer in which both addresses and integers are 32 bits wide, how many bytes of memory will the compiler allocate for following code fragment?
int a;
int * b = &a;
(a) 32
(b) 4
(c) 0
(d) 8
Correct answer is (d)
Your score on this question is: 7.14
Feedback:
See section 1.3.2 of the course notes.
--------------------------------------------------------------------------------
11.
Which of the following are true of the effect that optimizations have on the machine code generated by compilers?
The resulting code will be faster and/or smaller.
The resulting code will be clearer.
The resulting code will be harder to debug.
(a) I and II only
(b) I only
(c) I, II, and III
(d) I and III only
Correct answer is (d)
Your score on this question is: 0.00
Feedback:
See section 1.5.3 of the course notes.
--------------------------------------------------------------------------------
12.
Which of the following computations may be performed by exactly one CPU instruction?
a = 5;
a = b + c * 5;
for (i = 0; i < 10; i += a[i++]);
(a) I, II, and III
(b) I only
(c) II only
(d) I and II only
Correct answer is (b)
Your score on this question is: 7.14
Feedback:
See section 1.5.1 of the course notes.
--------------------------------------------------------------------------------
13.
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
Correct answer is (b)
Your score on this question is: 0.00
Feedback:
See section 1.5.1 of the course notes.
--------------------------------------------------------------------------------
14.
Consider the following pseudo-instructions.
0x40B7D8 i = i - 1
0x40B7E0 branch-if-not-zero 0x40B7D8
Which of the following code fragments do the instructions encode?
if (i != 0) i = i -1;
while (--i);
do { i = i - 1; } while (i);
(a) I only
(b) II and III only
(c) III only
(d) II only
Correct answer is (b)
Your score on this question is: 7.14
Feedback:
See section 1.5.2 of the course notes.
--------------------------------------------------------------------------------
Go to top of assessment.
Total score: 42.86
? Copyright 2005 iCarnegie, Inc. All rights reserved.
View Assessment Result
Family Name: Li
Given Name: Qin
Login: nwpu053816
E-mail: lqw3816@163.com
Status: Enrolled
Assessment Name: Multiple-Choice Quiz 1
Instance: 2
Section: NWPU-SSD6-6
During: Fall/Autumn 2007
Section Status: Active
For course: System-Level Programming
(SSD6)
Corresponding to: SSD6
At: Software College of Northwestern Polytechnical University
--------------------------------------------------------------------------------
Your performance was as follows:
You took 44 minutes on this assessment from Thu Dec 13 08:21:08 UTC+0800 2007 to Thu Dec 13 09:04:25 UTC+0800 2007.
Total score: 92.86
1.
Which of the following does a debugger do?
Analyze the source code to find programming errors.
Decode machine code generated by a compiler.
Stop execution of a program.
(a) I, II, and III.
(b) I and III only
(c) III only
(d) II and III only
Correct answer is (d)
Your score on this question is: 7.14
Feedback:
See section 1.1.3 of the course notes.
--------------------------------------------------------------------------------
2.
The machine code generated from source code by a compiler
(a) executes more quickly than the source code
(b) does not preserve all the information given in the source code
(c) associates variable values with their names
(d) can be easily inspected to check the correctness of the compiler
Correct answer is (b)
Your score on this question is: 7.14
Feedback:
See section 1.1.3 of the course notes.
--------------------------------------------------------------------------------
3.
When debugging using Visual C++, which of the following are possible through the Watch window?
The program's execution can be stopped.
The value of an arbitrary C expression can be calculated.
The value of a program variable can be set.
(a) II and III only
(b) I, II, and III.
(c) III only
(d) II only
Correct answer is (a)
Your score on this question is: 7.14
Feedback:
See section 1.2.3 of the course notes.
--------------------------------------------------------------------------------
4.
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
Correct answer is (d)
Your score on this question is: 7.14
Feedback:
See section 1.2.1 of the course notes.
--------------------------------------------------------------------------------
5.
Consider the function factorial() defined as follows.
int factorial(int n) {
if (n == 1) return n;
return n * factorial(n - 1);
}
How many activation records of factorial are allocated by invocation of the expression factorial(4)?
(a) 0
(b) 1
(c) 4
(d) 5
Correct answer is (c)
Your score on this question is: 7.14
Feedback:
See section 1.4.2 of the course notes.
--------------------------------------------------------------------------------
6.
What is printed as a result of execution of the following program?
#include <stdio.h>
void callee(int * count) {
(*count)++;
}
int main (int argc, char *argv[]) {
int count = 4;
callee(&count);
printf("%d", count);
return 0;
}
(a) 5
(b) 8
(c) 4
(d) It cannot be determined from the information given.
Correct answer is (a)
Your score on this question is: 7.14
Feedback:
See section 1.4.1 of the course notes.
--------------------------------------------------------------------------------
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -