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 18:30
Which of these options are the correct sequence of actions for content to be copied and pasted? select content, click the copy button, click the paste button, and move the insertion point to where the content needs to be inserted. click the copy button, select the content, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, click the copy button, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, move the insertion point to where the content needs to be inserted, click the copy button, and click the paste button.
Answers: 3
question
Computers and Technology, 23.06.2019 03:10
Acomputer has a two-level cache. suppose that 60% of the memory references hit on the first level cache, 35% hit on the second level, and 5% miss. the access times are 5 nsec, 15 nsec, and 60 nsec, respectively, where the times for the level 2 cache and memory start counting at the moment it is known that they are needed (e.g., a level 2 cache access does not even start until the level 1 cache miss occurs). what is the average access time?
Answers: 1
question
Computers and Technology, 23.06.2019 19:00
Acompany is hiring professionals for web designing. the firm is small with few resources. they want employees who possess problem-solving skills and can independently carry out responsibilities. which kind of employee should they select?
Answers: 2
question
Computers and Technology, 24.06.2019 12:00
An npn transistor is correctly biased and turned on if the a. base is negative. b. collector is negative. c. collector is positive with respect to the emitter and negative with respect to the base. d. collector is the most positive lead followed by the base.
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, 03.11.2020 22:00
question
Mathematics, 03.11.2020 22:00
question
History, 03.11.2020 22:00
question
English, 03.11.2020 22:00
question
Mathematics, 03.11.2020 22:00
question
Mathematics, 03.11.2020 22:00
question
Social Studies, 03.11.2020 22:00
question
Mathematics, 03.11.2020 22:00
Questions on the website: 13722361