Programming Language Project

Question Set #5

Due: November 18, 2004 at start of class

Answers MUST be keyed in before printing

 

Name ________________________     Programming Language ___________

 

Note:  For each of these question sets, you should look first in the reports you were given.  You should then check the information on the Web or in a book.  If the information is not in the report, you should say so and then find it on the Web or in a book or by experimenting.  Save the results of your experiments. You may need them in a later assignment.

 

All of these questions are about arrays.  If your language doesn’t have arrays, you need to e-mail me and tell me what composite structure it does have (lists, records, tables, etc.) that you could use as an alternate.

 

  1. What symbols are used to delimit array indexes (i.e. ( ),  [ ], something else)?

 

 

  1. Give an example of a one dimensional array declaration.

 

 

  1. Give an example of  a two dimensional array declaration.

 

 

  1. What types are legal for subscripts?

 

 

  1. Can arrays be initialized when they have their storage allocated?

 

 

  1. Can you initialize the entire array at once or do you have to initialize it item by item?

 

 

  1. Are ragged or rectangualar multidimensional arrays allowed, or both?  

 

 

  1. What kind of slices are allowed, if any?

 

 

  1. Are array sizes static or dynamic?

 

 

  1.  Does your language detect a reference to an out of bounds array subscript?