Multiple choice
Thehonest1. (TCO 5) How many times will DOG be displayed when the following lines are executed?
For counter As Integer = 13 To -3 Step -6
System.Console.WriteLine("DOG")
Next
Two
Three
Four
Five
None of the above
2. (TCO 5) What numbers will be displayed by the following code?
Dim num As Integer = 7
Do
num += 1
System.Console.WriteLine(num.ToString("N0"))
Loop Until (num > 6)
System.Console.WriteLine(num.ToString("N0"))
7
8
7 and 8
8 and 8
3. (TCO 5) Floating-point variables, such as Double, should not be used _____.
as counters that control loop execution
to perform mathematical calculations inside a loop
as approximate representations of decimal numbers
for applications when precision is required
4. (TCO 5) You are writing a For…Next loop. Which of the following is valid for an initial or terminating value?
The value stored in a variable declared as an Integer
info.Length, where info is a String variable
10
All of the above
- 10 years ago
Purchase the answer to view it
- 13.doc