MCQOPTIONS
Saved Bookmarks
This section includes 7 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. |
Which of the following assigns the string “Rover” to the fifth element in a one-dimensional array named strPetNames? |
| A. | strPetNames(4) = “Rover” |
| B. | strPetNames[4] = “Rover” |
| C. | strPetNames(5) = “Rover” |
| D. | strPetNames.Items.Add(5) = “Rover” |
| Answer» B. strPetNames[4] = “Rover” | |
| 2. |
Which of the following statements assigns (to the intElements variable) the number of elements contained in the intNums array? |
| A. | intElements = Len(intNums) |
| B. | intElements = Length(intNums) |
| C. | intElements = intNums.Len |
| D. | intElements = intNums.Length |
| E. | the number of elements contained in the intNums array?a) intElements = Len(intNums)b) intElements = Length(intNums)c) intElements = intNums.Lend) intElements = intNums.Length |
| Answer» E. the number of elements contained in the intNums array?a) intElements = Len(intNums)b) intElements = Length(intNums)c) intElements = intNums.Lend) intElements = intNums.Length | |
| 3. |
What is the array of these statements? |
| A. | { 75, 78, 83, 90} |
| B. | { 78, 75, 90, 83 } |
| C. | { 90, 83, 78, 75 } |
| D. | Compilation ErrorView Answer |
| Answer» E. | |
| 4. |
What will be the output of the following Visual Basic code? |
| A. | 78, 83, 75,90 |
| B. | 75,78, 83,90 |
| C. | 78,75,83,90 |
| D. | 90,83,78,75View Answer |
| Answer» C. 78,75,83,90 | |
| 5. |
__________________ method is used to reverse the values. |
| A. | Array.Reverse |
| B. | Array.Sort Desc |
| C. | Array.Sort Asc |
| D. | Array.rev |
| Answer» B. Array.Sort Desc | |
| 6. |
Arranging data in a specific order is called as ___________ |
| A. | Arranging |
| B. | Sorting |
| C. | Organizing |
| D. | Making |
| Answer» C. Organizing | |
| 7. |
________ method is used to sort an array in visual basic. |
| A. | Array.arrange() |
| B. | Array.arrayArrange() |
| C. | Array.Sort() |
| D. | Array.sortAscending() |
| Answer» D. Array.sortAscending() | |