CSI 1300 FINAL EXAM QUESTIONS
WITH COMPLETE ANSWERS
In the line of code: "Dim scores() As Integer = {55, 33, 12}", the upper bound of the
array scores is which of the following? - ANSWER-2
The default event procedure for a check box is _______ . - ANSWER-Checked
Changed
Which of the following arithmetic operations has the highest level of precedence? -
ANSWER-( )
Which of the following masks is appropriate for a masked text box into which the user
will enter a license plate consisting of two digits followed by 4 letters? - ANSWER-
00LLLL
Although the documentation step is usually listed last in the problem-solving process, it
should actually begin when the problem is first defined and continue through the
problem-solving process. (T/F) - ANSWER-True
What property of a control determines whether the control can receive the focus during
run time? - ANSWER-TabStop
txtBox.Text = (1234.567).ToString("C") - ANSWER-
The Do Loop Until block is always executed at least once. (T/F) - ANSWER-True
Which of the following is a valid name for a variable? - ANSWER-Two_One
If the value of the Date variable currently is the first day of 2011, then what is displayed
by the statement: txtBox.Text = CStr(currently.AddMonths(1))? - ANSWER-2/1/2011
The Font dialog box allows you to select different Fonts, their style, their size, and some
other special effects. How do you bring up this Font dialog box? - ANSWER-In the
Properties window, click the ellipsis (...) on the right side of the settings box for the Font
property
What is the key difference between a group of check boxes attached to a group box and
a group of radio buttons attached to a group box? - ANSWER-Only one radio button at
a time can be checked.
Which of the following is the proper order of procedures used in the problem-solving
process? - ANSWER-analysis, design, coding, testing
,MessageBox.Show("This is a test.", "Test") - ANSWER-Test
Visual Basic access keys are created by using which symbol in a button's Text
property? - ANSWER-amp &
IntelliSense is a technology built into Visual Basic that assists the programmer by -
ANSWER-automatically displaying the methods and properties available to a control.
The lstBox.Items.Clear() statement is used to empty the contents of a list box. (T/F) -
ANSWER-True
Which of the statements will unhighlight any highlighted item in lstBox? - ANSWER-
lstBox.SelectedIndex = -1
One must always have a Next statement paired with a For statement. (T/F) - ANSWER-
True
When one For...Next loop is contained within another, the name of the counter variable
for each For...Next loop may be the same. (T/F) - ANSWER-False
When using Try-Catch-Finally blocks, the programmer is limited to three Catch blocks of
code. (T/F) - ANSWER-False
A fractional number such as 4.6 is not allowed as a subscript. (T/F) - ANSWER-True
Which of the following expressions refers to the contents of the first row of the list box? -
ANSWER-lstBox.Items(0)
Which of the numbers below is equivalent to 0.000017489? - ANSWER-1.7489E-05
Each argument in a calling statement must have the same name as the corresponding
parameter in the header of the called procedure. (T/F) - ANSWER-False
Breaking up a large problem into smaller subproblems is called _________________. -
ANSWER-Stepwise refinement
Which of the following statements declare the variables a and b as type Integer? -
ANSWER-Dim a, b As Integer
In most cases, a well-written program need not be tested. (T/F) - ANSWER-False
In a Try-Catch-Finally block, the Catch clauses are considered one at a time, in the
order in which they appear in the code, until the proper exception is located. (T/F) -
ANSWER-True
, Which of the following expressions will yield the string "John Doe", where name1 =
"John Blake" and name2 = "Janet Doe"? - ANSWER-name1.Substring(0, 5) &
name2.Substring(6, 3)
Which of the following exceptions will be generated by trying to access a disk drive that
doesn't contain a disk? - ANSWER-IO.DirectoryNotFoundException
The analysis and design steps of program planning are largely independent of the
particular computer language the programmer is using. (T/F) - ANSWER-True
_________ calculate the sums of numerical values in lists. - ANSWER-NOT counter
variables
If the While condition in a Do While loop is false the first time it is encountered, the
statements in the loop are still executed once. (T/F) - ANSWER-False
Which of the following techniques does NOT always toggle the checked and unchecked
state of a check box control? - ANSWER-Set the Checked property equal to 1.
If strVar.Length is 5, then the value of strVar.Substring(4, 1) is the last character of the
value of strVar. (T/F) - ANSWER-True
"Desk-checking" refers to - ANSWER-testing an algorithm at the flowchart stage using
several different kinds of data.
Asc("A") is 65. What is Asc("C")? - ANSWER-67
Given x = 3 and y = 1, what value will be assigned to the Double variable w when the
following statement is executed? w = (x + y) / (x - y) - ANSWER-2
The value of "education".StartsWith("ED") is True. (T/F) - ANSWER-False
Pseudocode is - ANSWER-a description of an algorithm similar to a computer language
Variable arrays can only be one- or two-dimensional. (T/F) - ANSWER-False
What is the correct statement when declaring and assigning the value of 100 to an
Integer variable called "numPeople"? - ANSWER-Dim numPeople As Integer = 100
Both constants and expressions can be used as arguments in calling statements. (T/F) -
ANSWER-True
A variable declared inside a Select Case block cannot be referred to by code outside of
the block. (T/F) - ANSWER-True
WITH COMPLETE ANSWERS
In the line of code: "Dim scores() As Integer = {55, 33, 12}", the upper bound of the
array scores is which of the following? - ANSWER-2
The default event procedure for a check box is _______ . - ANSWER-Checked
Changed
Which of the following arithmetic operations has the highest level of precedence? -
ANSWER-( )
Which of the following masks is appropriate for a masked text box into which the user
will enter a license plate consisting of two digits followed by 4 letters? - ANSWER-
00LLLL
Although the documentation step is usually listed last in the problem-solving process, it
should actually begin when the problem is first defined and continue through the
problem-solving process. (T/F) - ANSWER-True
What property of a control determines whether the control can receive the focus during
run time? - ANSWER-TabStop
txtBox.Text = (1234.567).ToString("C") - ANSWER-
The Do Loop Until block is always executed at least once. (T/F) - ANSWER-True
Which of the following is a valid name for a variable? - ANSWER-Two_One
If the value of the Date variable currently is the first day of 2011, then what is displayed
by the statement: txtBox.Text = CStr(currently.AddMonths(1))? - ANSWER-2/1/2011
The Font dialog box allows you to select different Fonts, their style, their size, and some
other special effects. How do you bring up this Font dialog box? - ANSWER-In the
Properties window, click the ellipsis (...) on the right side of the settings box for the Font
property
What is the key difference between a group of check boxes attached to a group box and
a group of radio buttons attached to a group box? - ANSWER-Only one radio button at
a time can be checked.
Which of the following is the proper order of procedures used in the problem-solving
process? - ANSWER-analysis, design, coding, testing
,MessageBox.Show("This is a test.", "Test") - ANSWER-Test
Visual Basic access keys are created by using which symbol in a button's Text
property? - ANSWER-amp &
IntelliSense is a technology built into Visual Basic that assists the programmer by -
ANSWER-automatically displaying the methods and properties available to a control.
The lstBox.Items.Clear() statement is used to empty the contents of a list box. (T/F) -
ANSWER-True
Which of the statements will unhighlight any highlighted item in lstBox? - ANSWER-
lstBox.SelectedIndex = -1
One must always have a Next statement paired with a For statement. (T/F) - ANSWER-
True
When one For...Next loop is contained within another, the name of the counter variable
for each For...Next loop may be the same. (T/F) - ANSWER-False
When using Try-Catch-Finally blocks, the programmer is limited to three Catch blocks of
code. (T/F) - ANSWER-False
A fractional number such as 4.6 is not allowed as a subscript. (T/F) - ANSWER-True
Which of the following expressions refers to the contents of the first row of the list box? -
ANSWER-lstBox.Items(0)
Which of the numbers below is equivalent to 0.000017489? - ANSWER-1.7489E-05
Each argument in a calling statement must have the same name as the corresponding
parameter in the header of the called procedure. (T/F) - ANSWER-False
Breaking up a large problem into smaller subproblems is called _________________. -
ANSWER-Stepwise refinement
Which of the following statements declare the variables a and b as type Integer? -
ANSWER-Dim a, b As Integer
In most cases, a well-written program need not be tested. (T/F) - ANSWER-False
In a Try-Catch-Finally block, the Catch clauses are considered one at a time, in the
order in which they appear in the code, until the proper exception is located. (T/F) -
ANSWER-True
, Which of the following expressions will yield the string "John Doe", where name1 =
"John Blake" and name2 = "Janet Doe"? - ANSWER-name1.Substring(0, 5) &
name2.Substring(6, 3)
Which of the following exceptions will be generated by trying to access a disk drive that
doesn't contain a disk? - ANSWER-IO.DirectoryNotFoundException
The analysis and design steps of program planning are largely independent of the
particular computer language the programmer is using. (T/F) - ANSWER-True
_________ calculate the sums of numerical values in lists. - ANSWER-NOT counter
variables
If the While condition in a Do While loop is false the first time it is encountered, the
statements in the loop are still executed once. (T/F) - ANSWER-False
Which of the following techniques does NOT always toggle the checked and unchecked
state of a check box control? - ANSWER-Set the Checked property equal to 1.
If strVar.Length is 5, then the value of strVar.Substring(4, 1) is the last character of the
value of strVar. (T/F) - ANSWER-True
"Desk-checking" refers to - ANSWER-testing an algorithm at the flowchart stage using
several different kinds of data.
Asc("A") is 65. What is Asc("C")? - ANSWER-67
Given x = 3 and y = 1, what value will be assigned to the Double variable w when the
following statement is executed? w = (x + y) / (x - y) - ANSWER-2
The value of "education".StartsWith("ED") is True. (T/F) - ANSWER-False
Pseudocode is - ANSWER-a description of an algorithm similar to a computer language
Variable arrays can only be one- or two-dimensional. (T/F) - ANSWER-False
What is the correct statement when declaring and assigning the value of 100 to an
Integer variable called "numPeople"? - ANSWER-Dim numPeople As Integer = 100
Both constants and expressions can be used as arguments in calling statements. (T/F) -
ANSWER-True
A variable declared inside a Select Case block cannot be referred to by code outside of
the block. (T/F) - ANSWER-True