Which 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.
Which 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.
Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter8: Arrays
Section: Chapter Questions
Problem 20RQ
Related questions
Question
Which 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.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
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,
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,