Programming with Microsoft Visual Basic 2017
8th Edition
ISBN: 9781337102124
Author: Diane Zak
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Expert Solution & Answer
Chapter 8, Problem 21RQ
Program Description Answer
The statement “decPays.GetUpperBound(1)” is used to return the highest column subscript in a two-dimensional array named decPays.
Hence, the correct answer is option “A”.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Which of the following returns the highest column subscript in a two-dimensional array named decPays? a. decPays.GetUpperBound(1) b. decPays.GetUpperBound(0) c. decPays.GetUpperSubscript(0) d. decPays.GetHighestColumn(0)
Which of the following declares a five-element one-dimensional array? a. Dim intSold(4) As Integer b. Dim intSold(5) As Integer = {4, 78, 65, 23, 2} c. Dim intSold() As Integer = {4, 78, 65, 23, 2} d. Both a and c.
Which of the following declares a two-dimensional array that has four rows and three columns? a. Dim decNums(2, 3) As Decimal b. Dim decNums(3, 4) As Decimal c. Dim decNums(3, 2) As Decimal d. Dim decNums(4, 3) As Decimal
Chapter 8 Solutions
Programming with Microsoft Visual Basic 2017
Knowledge Booster
Similar questions
- Which of the following declares a two-dimensional array that contains four rows and two columns?a. Dim strLetters(3, 1) As Stringb. Private strLetters(3, 1) As Stringc. Dim strLetters(,) ={{"A", "B"}, {"C", "D"},{"E", "F"}, {"G", "H"}}d. all of the abovearrow_forwardWhich of the following assigns the number 1 to each element in a five-element, one-dimensional Integer array named intCounters?a. For intSub As Integer = 0 To 4 intCounters(intSub) = 1 Next intSubb. For intSub As Integer = 1 To 5 intCounters(intSub – 1) = 1 Next intSubc. Dim intSub As Integer Do While intSub < 5 intCounters(intSub) = 1 intSub += 1 Loopd. all of the abovearrow_forwardWhich of the following adds the number 20 to the value stored in the first row, second column of the decSales array?a. decSales(0, 1) += 20b. decSales(1, 2) = decSales(1, 2) + 20c. decSales(1, 2) += 20d. both b and carrow_forward
- If the decSales array is a two-dimensional array, which of the following assigns the highest column subscript to the intHighCol variable?a. intHighCol = decSales.GetHighestSub(0)b. intHighCol = decSales.GetHighBound(1)c. intHighCol = decSales.GetUpperBound(0)d. none of the abovearrow_forwardWhich of the following assigns the number 0 to each element in the intSums array, which contains two rows and four columns?a. For intRow As Integer = 0 To 1 For intCol As Integer = 0 To 3 intSums(intRow, intCol) = 0 Next intCol Next intRow b. Dim intRow As Integer Dim intCol As Integer Do While intRow < 2 intCol = 0 Do While intCol < 4 intSums(intRow, intCol) = 0 intCol += 1 LoopintRow += 1Loopc. For intRow As Integer = 1 To 2 For intCol As Integer = 1 To 4 intSums(intRow - 1, intCol - 1) = 0 Next intCol Next intRowd. all of the abovearrow_forwardWhich of the following adds 100 to the value stored in the first row, second column of the array?a. intNum(0, 1) = intNum(0, 1) + 100b. intNum(1, 0) = intNum(1, 0) + 100c. intNum(1, 2) = intNum(1, 2) + 100d. intNum(2, 1) = intNum(2, 1) + 100arrow_forward
- 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"arrow_forwardWhich of the following assigns the string “Micki” to the fifth element in aone-dimensional array named strPetNames?a. strPetNames(4) = "Micki"b. strPetNames[4] = "Micki"c. strPetNames(5) = "Micki"d. strPetNames[5] = "Micki"arrow_forwardWhich of the following assigns the number 0 to each element in a two-row, four-column Integer array named intSums? a. For intRow As Integer = 0 To 1 For intCol As Integer = 0 To 3 intSums(intRow, intCol) = 0 Next intCol Next intRow b. Dim intRow As Integer Dim intCol As Integer Do While intRow < 2 intCol = 0 Do While intCol < 4 intSums(intRow, intCol) = 0 intCol += 1 Loop intRow += 1 Loop c. For intX As Integer = 1 To 2 For intY As Integer = 1 To 4 intSums(intX - 1, intY - 1) = 0 Next intY Next intX d. All of the above.arrow_forward
- Which of the following displays the number of elements contained in theintItems array?a. lblCount.Text = intItems.Lenb. lblCount.Text = intItems.Lengthc. lblCount.Text = Length(intItems)d. lblCount.Text = intItems.NumElementsarrow_forwardWhich of the following declares a four-element one-dimensional array?a. Dim strLetters() As String = "A", "B", "C", "D"b. Dim strLetters(3) As String = {"A", "B", "C", "D"}c. Dim strLetters(3) As Stringd. both b and carrow_forwardWhich of the following adds 10 to every value in a 16-element integer array named points? a. both of these b. foreach(int sub in points) points += 10; c. for(int sub = 0; sub > 16; ++sub) points[sub] += 10; d. neither of thesearrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,