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

Discussion

Structural type equivalence holds when two type expressions

  • A.were declared under the same name somewhere in the source program
  • B.occupy the same number of bytes in the target machine
  • C.were declared in the same scope of the program
  • D.have the same structure regardless of the names given to them

Answer: D

Correct answer: have the same structure regardless of the names given to them

Structural equivalence compares the type expressions themselves, so two records with the same fields in the same order are the same type whatever they are called. Name equivalence takes the opposite view and treats distinct declarations as distinct types - and languages differ in which they adopt, which matters greatly for interchangeability.

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

Post your comment

Please log in or register to post a comment.