Review Questions :
16.What array operations are provided
specifically for single-dimensioned arrays in Ada?
Answer:
Catenation specified by the ampersand (&)
17. Define row major order and
column major order.
Answer:
Row major order: the
elements of the array that have as their first subscript the lower bound value
of that subscript are stored first, followed by the elements of the second
value of the first subscript, and so forth. If the array is a matrix, it is
stored by rows.
Column major order: the
elements of an array that have as their last subscript the lower bound value of
that subscript are stored first, followed by the elements of the second value
of the last subscript, and so forth. If the array is a matrix, it is stored by
columns.
18.
What is an access function for an array?
Answer:
Answer:
Access function maps subscript expressions to an
address in the array
20. What is the structure of an
associative array?
Answer:
Answer:
Unordered collection of
elements indexed by an equal number of KEYS.
21. What is
the purpose of level numbers in COBOL records?
Answer:
The level numbers in
COBOL records are used to establish a hierarchical structure of related
records.
22. Define fully qualified and
elliptical references to fields in records.
Answer:
Fully qualified
reference to fields in records is one in which all intermediate record names,
from the larges enclosing record to the specific field, are named in the
reference.
Elliptical
references to fields in records is when the field is named, but any or all of
the enclosing record names can be omitted, as long as the resulting reference
is unambiguous in the referencing environment.
23. What is the primary difference between a record and a tuple?
Answer:
A tuple is similar to a record, but do
not have names for their constituent parts.
24. Are the tuples of Python mutable?
Answer:
No, they aren’t.
No comments:
Post a Comment