Contents    Page-10    Prev    Next    Page+10    Index   

Static type checking:

  • A: has significant runtime cost
  • B: saves time and storage
  • C: helps error detection at compile time
  • D: saves time but costs storage
  • E: B and C

    Answer: E

    With dynamic type checking, before an operation can be done on data, it is necessary to check what type the data is at runtime. This takes extra instructions, which use both space and time. It also means that a type error might occur at runtime rather than at compile time.

    With static type checking, the type tests are done at compile time, so no test is needed at runtime. Errors are detected at compile time.