Certiport Software Development #4 Exam
Questions and Answers
You execute the following code.
for (int i = 0; i <=10; i+=2)
{
Console.WriteLine("Hello");
}
How many times will the word Hello be printed?
A.) 10
B.) 4
C.) 6
D.) 8 - Correct Answers -C.) 6
Dim beakerFull As Boolean = True
Dim flameOn As Boolean = False
Dim iResults As Integer = 0
If beakerFull = True Then
If flameOn = True Then
iResult =1
Else
iResult = 2
End if
Else
iResult = 3
End If
What will the variable iResult be?
A.) 4
B.) 1
C.) 0
D.) 2 - Correct Answers -D.) 2
Questions and Answers
You execute the following code.
for (int i = 0; i <=10; i+=2)
{
Console.WriteLine("Hello");
}
How many times will the word Hello be printed?
A.) 10
B.) 4
C.) 6
D.) 8 - Correct Answers -C.) 6
Dim beakerFull As Boolean = True
Dim flameOn As Boolean = False
Dim iResults As Integer = 0
If beakerFull = True Then
If flameOn = True Then
iResult =1
Else
iResult = 2
End if
Else
iResult = 3
End If
What will the variable iResult be?
A.) 4
B.) 1
C.) 0
D.) 2 - Correct Answers -D.) 2