CS 159 Lab 10

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/21

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

22 Terms

1
New cards

An array is a collection of elements of the same data type

true

2
New cards

Placing the subscript of an element inside of square brackets is known as indexing.

true

3
New cards

In a fixed-length array the size of the array is known when the program is written.

true

4
New cards

Arrays must be declared and defined before they can be used.

true

5
New cards

Array declarations will determine the type, name, and size of the array.

true

6
New cards

For a value to be potentially used as an index it must be an integral value or an expression that evaluates to such.

true

7
New cards

The name of an array is a reference to the address of where it begins inside the memory of the computer.

true

8
New cards

The index value represents an offset from the beginning of the array to the element being referenced.

true

9
New cards

Declaration and definition of an array will include a default initialization of all elements.

false (only for fixed length arrays)

10
New cards

If the number of values provided for initialization of an array is fewerthan the size of the array then the remaining elements have no known value.

false (filled with zeros)

11
New cards

The address operator is not necessary in a scanf to accept input for an individual array element when using the indexing technique.

false

12
New cards

When accessing an array element the C language does not check whether the index is within the boundary of an array.

true

13
New cards

Arrays can be passed in two ways; by individual elements or the whole array.

true

14
New cards

Elements of an array, themselves individual values of a given data type, are passed by value from calling to called function.

true

15
New cards

The called function cannot tell whether the value it receives comes from an array, an individual variable, or an expression that evaluates to the expected type.

true

16
New cards

Individual elements of an array can be passed by address through the use of the address operator.

true

17
New cards

The reason that the C language does not pass whole arrays by value is the extra stress it would put on the memory of the computer to make a copy of an array.

true

18
New cards

The name of an array is a primary expression whose value is the address of the first element in the array

true

19
New cards

Indexed references to individual elements of an array are simply calculated addresses where the index value is added to the address represented by the name of the array.

true

20
New cards

Passing the array name to a function allows changes in the called function to be available back in the calling function after it terminates.

true

21
New cards

When passing a whole array to the function the total size of the array is necessary in the definition of the called function.

false

22
New cards

It is only the starting point of the array in memory that is represented by the name of an array and not the ending point.

true