MCQOPTIONS
Saved Bookmarks
This section includes 4 Mcqs, each offering curated multiple-choice questions to sharpen your Visual Basic Questions and Answers knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
The intSales array is declared as follows: Dim intSales() As Integer = {10000, 12000, 900, 500, 20000}. Which of the following loops will correctly add 100 to each array element? The intSub variable contains the number 0 before the loops are processed. |
| A. | a) |
| Answer» D. | |
| 2. |
The intNums array is declared as follows: Dim intNums() As Integer = {10, 5, 7, 2}. Which of the following blocks of code correctly calculates the average value stored in the array? The intTotal, intSub, and dblAvg variables contain the number 0 before the loops are processed. |
| A. | a) |
| Answer» C. | |
| 3. |
The intSales array is declared as follows: Dim intSales() As Integer = {10000, 12000, 900, 500, 20000}. Which of the following If clauses determines whether the intSub variable contains a valid subscript for the array? |
| A. | a) |
| Answer» C. | |
| 4. |
The strItems array is declared as follows: Dim strItems(20) As String. The intSub variable keeps track of the array subscripts and is initialized to 0. Which of the following Do clauses will process the loop instructions for each element in the array? |
| A. | a) |
| Answer» C. | |