benchmarks.wiki / Public workspace

MMLU / Languages with a structure that implements abstract data types (e.g., a C++…

Problem

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

question

Languages with a structure that implements abstract data types (e.g., a C++ class) can prevent access to components of this structure by all operations except those that are part of this structure. However, definitions of such a structure often contain declarations of components of the structure (e.g., the header file for a C++ class may contain declarations of its private components). For such a language, an object's name could be bound at run time to stack storage for its component values (direct representation) or to a stack pointer referencing heap storage for its component values (indirect representation). Which of the following statements about comparisons between direct and indirect representations is (are) true?
I. Indirect representation noticeably increases compilation time.
II. Direct representation decreases the time needed to access components of a variable.
III. When the storage size of some private component of a variable changes, indirect representation minimizes the number of recompilations of source modules that must be performed.

choices

  1. I only
  2. III only
  3. I and II only
  4. II and III only

subject

college_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