benchmarks.wiki / Public workspace

MMLU / An algorithm for finding the average of N numbers is average = sum / N, where N…

Problem

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

question

An algorithm for finding the average of N numbers is average = sum / N, where N and sum are both integers. In a program using this algorithm, a programmer forgot to include a test that would check for N equal to zero. If N is zero, when will the error be detected?

choices

  1. At compile time
  2. At edit time
  3. As soon as the value of N is entered
  4. During run time

subject

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