subject

Consider the following code segment, where num is a properly declared and initialized integer variable. The following code segment is intended to set foundRow and foundCol to the row and column indexes of an array element containing num. The code segment does not work as intended. int[][] arr = {{10, 11, 12, 13},

{22, 24, 26, 28},

{15, 16, 17, 18},

{40, 41, 42, 43}};

int foundRow = -1;

int foundCol = -1;

for (int j = 0; j < arr. length; j++)

{

for (int k = 1; k < arr[0].length; k++)

{

if (arr[j][k] == num)

{

foundRow = j;

foundCol = k;

}

}

}

Which of the following values for num can be used as a test case to show that the code segment does not work as intended?

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:10
10. when you create a pivottable, you need to specify where to find the data for the pivottable. is it true
Answers: 2
question
Computers and Technology, 23.06.2019 05:00
Jason works as an accountant in a department store. he needs to keep a daily record of all the invoices issued by the store. which file naming convention would him the most?
Answers: 2
question
Computers and Technology, 23.06.2019 07:00
To produce a starlight effect in her photograph, lina should choose the filter for her camera.
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Open this link after reading about ana's situation. complete each sentence using the drop-downs. ana would need a minimum of ato work as a translator. according to job outlook information, the number of jobs for translators willin the future.
Answers: 3
You know the right answer?
Consider the following code segment, where num is a properly declared and initialized integer variab...
Questions
question
Social Studies, 04.07.2019 20:00
question
Mathematics, 04.07.2019 20:00
Questions on the website: 13722360