Page 1 of 1

True/False Whereas a derived type is compatible with the parent type, a subtype is not. True/False Enumerated type is a

Posted: Sun May 15, 2022 8:01 am
by answerhappygod
True/False Whereas a derived type is compatible with the parent
type, a subtype is not.
True/False Enumerated type is a subtype of integers in most
languages.
An array is declared as int a[3:10][5:15] in some unspecified
language, where the range of row subscripts is 3 -> 10, and the
range of column subscripts is 5 ->15. The array is stored in
row-major form and 4 bytes are allocated per integer. What is the
offset of element a[7][11] with respect to the address of element
a[3][5]?
Show steps for partial credit. ____________
Give two reasons why Ada's design of enumerated type is better than
that of C.
Note an advantage of implementing a character string in a
language as:
a primitive type (as in FORTRAN):
an array of characters (as in C):
Note one way in which:
The design of arrays in Modula-2 is more
flexible than that in C.
The design of arrays in C is better than that
in Ada.