6
5
4
7
Answer is Right!
Answer is Wrong!
The correct answer is B. 5.
The For
loop will iterate from 5 to 1, with a step size of -1. This means that the loop will execute 5 times, with the value of intNum
being 5, 4, 3, 2, and 1. The MessageBox.Show
method will be called once for each value of intNum
.
Option A is incorrect because the loop will only execute 5 times. Option C is incorrect because the loop will only execute 4 times. Option D is incorrect because the loop will only execute 7 times.