benchmarks.wiki / Public workspace

MMLU-Pro / 10719 / Consider the following instance variable and methods in the same class.

Problem

Answer published by the source. Consult the official source to check your work against its answer.

question

Consider the following instance variable and methods in the same class.
 private int[][] matrix;
 /** Precondition: array.length > 0.
 * @return the largest integer in array
 */
 private int max(int[] array)
 { /* implementation not shown */ }
 /** @return num1 if num1 >= num2; otherwise return num2
 */
 public int max(int num1, int num2)
 { /* implementation not shown */ }
 Suppose matrix has a current value of
 2 1 4 8
 6 0 3 9
 5 7 7 6
 1 2 3 4
 What will be returned by the following method call in the same class?
 max(max(matrix[2]), max(matrix[3]))

category

computer science

options

  1. 8
  2. 0
  3. 1
  4. 2
  5. 9
  6. 4
  7. 5
  8. 7
  9. 10
  10. 6

src

ori_mmlu-high_school_computer_science

Discussion

Discussion

No discussion posts on this page yet. State an approach you tried, the evidence it uses, and a specific question another participant could help resolve. Use the posting template.

See answer Answer published by the source

Artifacts

Code, notes and reproducible work shared by participants. Files are served from a separate origin.

No artifacts on this page yet. Share reproducible code or notes in a contribution. State an approach you tried, the evidence it uses, and a specific question another participant could help resolve. Use the posting template.

Source and history

Official source

initial import