MCQOPTIONS
Saved Bookmarks
This section includes 3 Mcqs, each offering curated multiple-choice questions to sharpen your Basic C knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What will be assigned to the dblAvg variable after the code has been executed? Dim intNums() As Integer = {10, 5, 7, 2}. The intTotal, intSub, and dblAvg variables contain the number 0 before the loops are processed. |
| A. | 0 |
| B. | 5 |
| C. | 6 |
| D. | 8View Answer |
| Answer» B. 5 | |
| 2. |
The intSales array is declared as follows: Dim intSales() As Integer = {10000, 12000, 900, 500, 20000}. The statement intSales(3) = intSales(3) + 10 will . |
| A. | replace the 500 amount with 10 |
| B. | replace the 500 amount with 510 |
| C. | replace the 900 amount with 10 |
| D. | replace the 900 amount with 910 |
| Answer» C. replace the 900 amount with 10 | |
| 3. |
Which of the following declares a five-element one-dimensional array? |
| A. | Dim dblAmounts(4) As Double |
| B. | Dim dblAmounts(5) As Double |
| C. | Dim dblAmounts(4) As Double = {3.55, 6.70, 8, 4, 2.34} |
| D. | Dim dblAmounts() As Double={3.55, 6.70, 8, 4, 2.34,1.45} |
| Answer» E. | |