Determine whether each of the following is true or false. If false, explain why.

1) To refer to a particular location or element within an array, we specify the name of the array and the value of the particular element.
2) An array definition reserves space for an array.
3) To indicate that 100 locations should be reserved for integer array p, you write the declaration
p[ 100 ];
4) A for statement must be used to initialize the elements of a 15-element array to zero.
5) Nested for statements must be used to total the elements of a two-dimensional array.

1) False. The name of the array and the subscript of the array are specified.
2) True.
3) False. A data type must be specified. An example of a correct definition would be:
int p[ 100 ];.
4) False. The array can be initialized in a declaration with a member initializer list.
5) False. The sum of the elements can be obtained without for statements, with one for statement, three for statements, etc.

Computer Science & Information Technology

You might also like to view...

Nontraditional data such as audio clips, video clips, pictures, and very large documents are called ________ data

A) enterprise B) multidimensional C) structured D) unstructured

Computer Science & Information Technology

In designing a storage subsystem, you must keep in mind that you may need network connectivity

Indicate whether the statement is true or false

Computer Science & Information Technology