Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. A defines a collection of data values and a set of predefined operations on t

ID: 3721212 • Letter: 1

Question

1. A defines a collection of data values and a set of predefined operations on those values. 2. A is the collection of the attributes of a variable. are types that cannot be further defined. 4. Give an example of a data type that cannot be further defined. 5. Give an example of a data type that can be further defined 6. days (Mon, Tue, Wed, Thu, Fri, Sat, Sun; is an example of what kind of data type? 7. are data elements in which an individual element is identified by its position relative to the first element. A array is one in which the subscript ranges are statically bound and storage allocation is static (done before run time). 8. 9. A array is one in which the subscript ranges are statically bound, but the allocation is done at declaration elaboration time during execution. 10. A jagged array is stored with each row in various lengths. (true or false) 11. A substructure of an array such as a a few elements of an array is called a slice. (true or false) 12. How does a single-dimensioned array look like in the memory cells? 13. Hashing is used to determine the index value in some arrays in some languages. (true or false) 14. The fundamental difference between a record and an array is that record elements, or fields, are not referenced by indices but by identifiers. (true or false) 15. In the following 01 EMPLOYEE- RECORD 02 EMPLOYEE- NAME 05 FIRST 05 Middle OS LAST PICTURE IS X(201. PICTURE IS X(10). PICTURE IS X(20). 02 HOURLY RATE PICTURE I5 99v99. The first name field type is defined as what type of data? 16. In problem 15 the record is a static type where the data is loaded dynamically. (true or false) 17. In probiem 15 the record is a dynamic type where the data is loaded statically. (true or false) 18. Records are preferred when the program is to process the fields in different ways. (true or false) 19. Arrays are preferred when the program is to process the data in the same way-(true or false) 20. A tuple is a data type that is similar to a record, except that the elements are not named. (true or false) 21. Lists are sequence containers that allow non-contiguous memory allocation. (true or false)

Explanation / Answer

1. A data type defines a collection of data values and a set of predefined operations on those values.

2. Keywordis the collection of the attributes of a variable.

3. Numerical data are the types that cannot be further defined

6. days{Mon, Tue, Wed, Thu, Fri, Sat, Sun} is an example of enum data type

7. array data elements in which an individual element is identified by its position relative to the first element.

8. static array is one in which the subscript ranges are statistically bound and storage allocation is static (done before run time)

9. Fixed static dynamic array is one in which the subscript ranges are statistically bound, but the allocation is done at declaration elaboration time during execution

10. a jagged array is stored with each row in various length - true,because an element stored may have different lengths in it.

11. substructure of an array such as a few elements of an array is called a slice - true because it is refered asa referencing part of an array

12. how does a single dimensional array look like in the memory cells? it looks like a list in memory

20.a tuple is a data type that is similar to a record,except that the elements are not named - true

21.lists are sequence containers that allow non-contiguous memory allocation - true