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

Visual Studio 2012 True or False True/False (10 point in total) Question 1. 1. T

ID: 3573238 • Letter: V

Question

Visual Studio 2012 True or False

True/False (10 point in total)

Question 1.1. The Select Case statement must include a Case Else clause. (Points : 1)        True
       False Question 2.2. A variable of type Long that equals 5 consumes less memory than a variable of type Integer that equals 5,000. (Points : 1)        True
       False Question 3.3. A For-Next loop must specify a Step value.
(Points : 1)        True
       False Question 4.4. A Do loop may evaluate a While condition before or after the loop body.
(Points : 1)        True
       False Question 5.5. In the Next statement of a For-Next loop, the name of the loop-counter variable name may optionally be provided.  

    For i As Integer = 0 to 10
        ' Statements here
    Next i

If the variable name is omitted from the Next statement, it defaults to 1.
(Points : 1)        True
       False Question 6.6. A variable's underlying data type cannot be changed with a type conversion function. (Points : 1)        True
       False Question 7.7. The conversion CInt(x), where x is a Long variable containing 5, is a narrowing conversion. (Points : 1)        True
       False Question 8.8. Converting Integer 55 to Long is a widening conversion. (Points : 1)        True
       False Question 9.9. The CStr function can be used to convert the string literal "10" into an integer. (Points : 1)        True
       False Question 10.10. CINT(" ") returns a value of 0. (Points : 1)        True
       False

Explanation / Answer

1. The Select Case statement must include a Case Else clause. False. The Case Else is optional actually.

2. A variable of type Long that equals 5 consumes less memory than a variable of type Integer that equals 5,000. True. A Long data type is formally allocated 8 bytes, but is not the same always.

3. A For-Next loop must specify a Step value. False. Step is an option here.

4. A Do loop may evaluate a While condition before or after the loop body. True. It depends on while or until.

5. In the Next statement of a For-Next loop, the name of the loop-counter variable name may optionally be provided.  
    For i As Integer = 0 to 10
        ' Statements here
    Next i
If the variable name is omitted from the Next statement, it defaults to 1. True.