Answer:
1. No 'Then' in the if statement
2. No syntax error.
3. No closing if statement that is no "END IF"
4. No syntax error
5. No syntax error
Step-by-step explanation:
1. The syntax for writing if statement in visual basic is:
If condition Then
'Stament block'
End If
From the above syntax, we see that the "Then" keyword is missing in the snippet.
2. This is okay as there is no syntax error.
str was declared as a string and a variable was assigned to it. Then, intLength was also declared as integer and the length of str is assigned to it.
3. The syntax for writing if statement in visual basic is:
If condition Then
'Stament block'
End If
From the above we can see that "End If" is missing in the given snippet.
4. There is no syntax error. The opening if and ending if are present.
5. There is no syntax error. The general form of writing a select case statement in Visual basic is:
Select Case VariableName
Case 1
"Statement to execute"
Case 2
"Statement to execute"
Case Else
"Default Statement to execute if other case fail"
End Select