subject

If numbers is a two-dimensional int array that has been initialized and total is an int that has been set to 0, which of the following will sum all the elements in the array?
1.for (int row = 0; row < numbers. length; row++) { for (int col = 0; col < numbers[row].length; col++) total += numbers[row][col]; }
2.for (int row = 0; row < numbers[row].length; row++) { for (int col = 0; col < numbers. length; col++) total += numbers[row][col]; }
3.for (int row = 1; row < numbers. length; row++) { for (int col = 1; col < numbers. length; col++) total += numbers[row][col]; }
4.for (int row = 0; row < numbers. length; row++) { for (int col = 0; col < numbers. length; col++) total += numbers[row][col]; }

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 23:00
Is an attack that relies on guessing the isns of tcp packets
Answers: 2
question
Computers and Technology, 23.06.2019 06:20
Which text function capitalizes the first letter in a string of text? question 10 options: upper capital first proper
Answers: 1
question
Computers and Technology, 23.06.2019 18:50
Ais a picture icon that is a direct link to a file or folder
Answers: 1
question
Computers and Technology, 23.06.2019 23:30
Match the following errors with their definitions. a. #name b. #value c. #ref d. 1. when a formula produces output that is too lengthy to fit in the spreadsheet cell 2. when you enter an invalid cell reference in a formula 3. when you type text in cells that accept numeric data 4. when you type in a cell reference that doesn’t exist
Answers: 1
You know the right answer?
If numbers is a two-dimensional int array that has been initialized and total is an int that has bee...
Questions
question
Mathematics, 20.03.2020 23:16
question
Biology, 20.03.2020 23:17
question
Mathematics, 20.03.2020 23:17
question
Mathematics, 20.03.2020 23:17
Questions on the website: 13722367