Machine-translated by Google. Questions are authored in English.
Top

Discussion

C does no automatic array bound checking. This is best described as

  • A.true
  • B.false
  • C.C's asset
  • D.C's shortcoming

Answer: D

Correct answer: C's shortcoming

C performs no bounds check, so an out-of-range subscript quietly reads or writes memory belonging to something else. It is generally counted a shortcoming - the source of buffer overflows and of many hard-to-find bugs. The omission was deliberate, since it keeps array access as cheap as raw address arithmetic, but later languages reinstated the check for good reason.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.