Which code example will calculate the number of checked items in a CheckedListBox named clbMovieNames and store the number in intCheckedMovies?

a. ```Dim intCheckedMovies As Integer = 0
intCheckedMovies = clbMovieNames.Items.Count – 1
```
b. ```Dim intIndex As Integer
Dim intCheckedMovies As Integer = 0
For intIndex = 0 To clbMovieNames.Items.Count – 1
If clbMovieNames.GetItemChecked(intIndex) = True Then
intCheckedMovies += 1
End If
Next
```
c. ```Dim intIndex As Integer
Dim intCheckedMovies As Integer = 0
For intIndex = 0 To clbMovieNames.Items.Count – 1
If clbMovieNames.GetItemChecked(intIndex) = True Then
lstChecked.Items.Add(clbCities.Items(intIndex))
End If
Next
```
d. ```Dim intIndex As Integer
Dim intCheckedMovies As Integer = 0
For intIndex= 1 To clbMovieNames.Items.Count
If clbMovieNames.GetItemChecked(intIndex) = True Then
intCheckedMovies += 1
End If
Next
```

b. ```Dim intIndex As Integer
Dim intCheckedMovies As Integer = 0
For intIndex = 0 To clbMovieNames.Items.Count – 1
If clbMovieNames.GetItemChecked(intIndex) = True Then
intCheckedMovies += 1
End If
Next
```

Computer Science & Information Technology

You might also like to view...

Select the type of Windows Server 2016 OS installation that is installed on a new disk partition and is not an upgrade from any previous version of Windows.

A. new installation B. fresh installation C. upgrade installation D. clean installation

Computer Science & Information Technology

The wildcard asterisk (*) always represents one single character.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology