Review Game Zone
Flash Cards
(current)
Games
Teachers
Search
CP1 ~ 5.01/5.02 - Programming Errors Debugging
Test Description: ~ 5.01/5.02 - Programming Errors Debugging
Instructions: Answer all questions to get your test result.
1) John’s computer program stopped executing and displayed an error message. What type of error is this?
A
Logic error
B
Dynamic error
C
Run-time error
D
Syntax error
2) Programming errors are classified into one of three categories. Which one is not a standard category?
A
Logic
B
Infinite
C
Syntax
D
Run-time
3) Sara thought her program would calculate grade point averages, but the program listed the highest grade instead. What type of error is this?
A
Dynamic error
B
Logic error
C
Runtime error
D
Syntax error
4) Jamie keyed “Interger” instead of “Integer”. What type of error resulted?
A
Logic error
B
Runtime error
C
Syntax error
D
Dynamic error
5) Which type of error produces undesired or unexpected results?
A
Syntax error
B
Dynamic error
C
Run-time error
D
Logic error
6) Misspelling a keyword is an example of a:
A
syntax error.
B
logic error.
C
run-time error.
D
dynamic error.
7) In the code below, determine the value of intJ displayed in the MessageBox. Dim intJ As Integer = 0 Dim intK As Integer = 0 Do while intJ 10 Do while intK 5 intK -= 1 Loop intJ += 1 Loop MessageBox.Show(intJ.ToString())
A
Program will not compile due to a syntax error.
B
MessageBox will not display due to a runtime error.
C
10
D
50
8) Which type of error halts the program when a statement cannot be executed?
A
Syntax error
B
Logic error
C
Dynamic error
D
Runtime error
9) Using the code below, determine the value of intJ displayed in the MessageBox. Dim intJ As Integer = 0 Dim intK As Integer = 0 Do While intJ 10 Do While intK 5 intK -= 1 Loop intJ += 1 Loop MessageBox.Show = intJ.ToString()
A
MessageBox will not display due to a runtime error.
B
10
C
50
D
Program will not compile due to a syntax error.
10) Alice wrote a program that executed but did not produce the expected output. What is the best method for Alice to use to find the error?
A
Add break-points and step through the code while watching the variable output
B
Add try catch
C
Hover over the variables in the code to change the output
D
Debug the program
11) If defaults are set to show the Watch window, which data would be shown in the Watch window?
A
variable values only
B
variable names only
C
variable: code statements
D
variable: values
12) Evaluate the code below. If intX is 1 and intY is 0, what is displayed in theMessageBox? Private Sub btn1_Click(ByVal sender as System.Object, ByVal e As System.EventArgs) Handles btn1.Click Dim gen as New Random Dim intX, intY As Integer in
A
False
B
Unknown
C
Both False and True
D
True
13) The reason to use a breakpoint is to:
A
examine variables and check logic.
B
evaluate the user interface.
C
verify code syntax.
D
set the tab order for controls.
14) In the code below, if the user enters thirty-seven into the TextBox1, the MessageBox will display: Private Sub btn1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn1.Click Dim intX As Integer Try intX = Convert.ToI
A
No MessageBox will be displayed.
B
37
C
Sorry, that is not a valid number, try again!
D
38
15) What is a purpose of the Watch window?
A
To switch to the Code window
B
To display the application interface
C
To display online help
D
To examine values during the execution of a program
16) What is a purpose of the Watch window?
A
To switch to the Code window
B
To examine values during the execution of a program
C
To display the application interface
D
To display online help
17) When the code is completely written but will not execute, what is the appropriate action?
A
Give the program to another programmer for review and correction.
B
Code another program to correct the program just completed.
C
Rewrite all the lines of code.
D
Perform programmer debugging and/or program debugging.
18) In the code below, if the user enters zero (0) into the TextBox1, the MessageBox will display: Private Sub btn1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn1.Click Dim intX As Integer Dim dblD As Double = 50.0
A
10
B
0
C
Sorry, not allowed
D
50
19) In the code below, if the user enters 5 into the TextBox1, the MessageBox will display: Private Sub btn1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn1.Click Dim intX As Integer Dim dblD As Double = 50.0 Try in
A
0
B
10
C
Sorry, not allowed!
D
50
*select an answer for all questions
Check Results & Get Answers
Play Games with the Questions Above
Teachers: Create FREE classroom games with your questions
Click for more info!
©2007-2024
ReviewGameZone.com
|
About
|
Privacy
|
Contact
|
Terms
|
Site Map
WAIT! Find what you needed?
×
Still Looking for the Answers?
Have Another Question?
Play a Review Game with These Questions?
Want to Make Your Own Test Like This One?