Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

11. (p. 115) If Option Strict is turned off and a declaration statement does not

ID: 3638677 • Letter: 1

Question

11. (p. 115) If Option Strict is turned off and a declaration statement does not specify a data type, it will default to _______.
A. boolean
B. string
C. object
D. variable
12. (p. 116) The reserved Visual Basic word, Dim, is short for dimension, which means _______.
A. declaration
B. size
C. storage location
D. identifier
13. (p. 116) Which of the following is a valid statement that can be used to declare a local variable that will store whole numbers?
A. Dim IndexWhole as Whole
B. Dim IndexString as String
C. Dim IntegerIndex as Index
D. Dim IndexInteger as Integer
14. (p. 116) Which of the following is a valid statement that can be used to declare a local variable that will store fractions?
A. Dim IndexFraction As Fraction
B. Dim IndexString As String
C. Dim IndexDecimal As Decimal
D. Dim IndexInteger As Integer

15. (p. 117) Where should the statement: Dim CounterInteger As Integer appear if you plan to use CounterInteger in only one event procedure?
A. The Declarations section of the form
B. The Form_Load procedure
C. The event procedure where CounterInteger will be used
D. The Namespace Constants file

16. (p. 117) Where should the statement: Const ACCOUNT_NUMBER_String As String = "A45" appear if you plan to use ACCOUNT_NUMBER_String in more than one procedure?
A. The Declarations section of the form
B. The Form_Load procedure
C. The event procedure where ACCOUNT_NUMBER_String will be used
D. The Namespace Constants file
17. (p. 117) A _______ variable is declared inside a procedure.
A. namespace
B. module-level
C. local
D. block
18. (p. 117) Variables declared within a button's click-event are _____ variables.
A. local
B. module-level
C. namespace
D. private
19. (p. 117) If a procedure contains a Dim statement and NameString is assigned as the identifier, NameString can be used _______.
A. anywhere in the project
B. only in the procedure where the Dim statement is shown
C. anywhere in the project if the variable name is changed to NAME_String
D. only once in the procedure
20. (p. 117) A variable that is declared in the Declarations section of a form is a(n) _______.
A. module-level variable
B. local variable
C. block variable
D. general variable
21. (p. 118) What statement should be used to declare a variable that is accessible from all procedures of a form?
A. Dim
B. Const
C. Private
D. Public
22. (p. 120) Integer.Parse is used to _______.
A. convert data in a textbox to a numeric value with no decimal places
B. properly align decimal positions in a numeric value
C. add a dollar sign ($) to improve the way the output looks
D. convert data in a textbox to a numeric value with 2 decimal places
23. (p. 120) Which of the following is NOT a valid method for parsing?
A. Integer.Parse
B. Decimal.Parse
C. Parse.String
D. All of these are valid
24. (p. 123) Which of the following has the highest order of precedence in arithmetic expressions?
A. Multiplication and division
B. Addition and subtraction
C. Exponentiation
D. Operators are not significant; all calculations are evaluated from left to right.

25. (p. 123) What will be the value of AnswerInteger after execution of these statements?
Const NumberAInteger as Integer = 6
Const NumberBInteger as Integer = 4
Const NumberCInteger as Integer = 2
AnswerInteger = NumberAInteger + NumberBInteger * NumberCInteger
A. 6
B. 14
C. 20
D. 48
26. (p. 123) Using the order of precedence and the formula below, what is AnswerInteger if?:
NumberOneInteger = 2, NumberTwoInteger = 12, NumberThreeInteger = 20, and NumberFourInteger = 6
AnswerInteger = NumberOneInteger * (NumberTwoInteger + NumberThreeInteger) - NumberFourInteger / NumberOneInteger
A. 19
B. 41
C. 61
D. None of these
27. (p. 123) What will be the value of TotalInteger after execution of this statement?
Assume that ValueInteger = 2.
TotalInteger = ((ValueInteger + 2) * (ValueInteger + 4)) / ValueInteger + 1
A. 13
B. 8
C. 12
D. None of these
28. (p. 123) What will be the value of AnswerInteger after execution of the following line of code?
Assume that NumberAInteger = 6, NumberBInteger = 4, NumberCInteger = 2
AnswerInteger = (NumberAInteger + NumberBInteger) * (NumberAInteger / NumberCInteger)
A. 6
B. 30
C. 27
D. None of these
29. (p. 126) The Visual Basic statement that requires all variables to be declared is _______.
A. Dim
B. Option Strict On
C. Option Explicit On
D. Declarations
30. (p. 129) You can use the _______method to round decimal values to the desired number of decimal positions.
A. ToDecimal
B. ToSingle
C. ToRound
D. Round
31. (p. 130) In order to control the number of decimals that will appear when a number is displayed, you can use _______.
A. a conversion function
B. a string variable
C. a constant
D. the format specifier codes
32. (p. 131) Which of the following is the correct code that will display the value in TotalSalesDecimal with a percent sign and 2 decimals?
A. TotalSalesDecimal(2)
B. TotalSalesPercent(2)
C. TotalSalesDecimal.ToString("P2")
D. TotalSalesDecimal.ToString(%2)
33. (p. 138) To trap or catch exceptions, use a _______ block and enclose any statement(s) that might cause an error.
A. With / End With
B. Try / Catch
C. For / Next
D. TheException
34. (p. 140) MessageBox.Show("Hello","Goodbye") will display _______.
A. "Hello" in the message box titlebar and "Goodbye" in the body of the message box
B. "Goodbye" in the body of the message box; "Hello" in the project's title bar
C. "Goodbye" in the message box titlebar and "Hello" in the body of the message box
D. None of these

Explanation / Answer

b c a a b c d a d b c d d b c a

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote