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

Discussion

Field offsets within a record are computed using

  • A.the alphabetical order of the field names in the record
  • B.a running total carried along the list of fields
  • C.the width of the whole record divided by the field count
  • D.a value supplied by the programmer for each field

Answer: B

Correct answer: a running total carried along the list of fields

Each field is placed at the current total, after which the total is advanced by that field’s width plus any padding. The offset is therefore an inherited attribute passed along the field list, and it is one of the standard illustrations of a syntax-directed definition using inherited attributes.

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

Post your comment

Please log in or register to post a comment.