hi
Yin and Yang Surfboard

Kamis, 06 November 2014

Chapter 6 : Data Types

From Book : Concept Of Programming  Languages 
By : Robert W. Sebesta

REVIEW QUESTION :

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 is where elements of the array that have as their first subscript the lower bound value of the subscript are stored first.

Column major order has elements of an array that have as their last subscript the lower bound value of that subscript are stored first.

18. What is an access function for an array?

Answer :
Access function maps subscript expressions to an address in the array


19. What are the required entries in a Java array descriptor, and when must they be stored (at compile time or run time)?
Answer :

In Java all arrays are fixed heap-dynamic arrays. Once created, tese arrays keep the same subscript ranges and storage. Secondarily, Java supports jagged arrays and not rectangular arrays. Being a fixed heap-dynamic array the entries will be established and fixed at run time.

20. What is the structure of an associative array?

Answer :
An associative array is an unordered collection of data elements that are indexed by an equal number of values called keys. User-defined keys must be stored.

Read More