General Info
Declare & Search
Passing Values
100
An array is a data structure that consists of
A contiguous block of memory cells
100
When declaring an array with a value list, the values are delimited by what character?
{ curly bracket for example: int num[ ] {1, 8, 7, 10, 4};
100
How do you pass the first element of an array numArr into a method called Sum, as an actual argument?
Sum (numArr[0]);
200
Array elements are identified by
Its index value
200
The value list does what in addition to loading values in the array?
Initialize the array at a certain size.
200
If the actual argument is an integer array (the entire array) how do you set up the formal parameter when you define the method?
private: void (int num[ ])
300
Individual data containers in an array are called
Elements
300
How are each of the value in an array accessed?
Use the loop control variable of the for loop
300
How do you pass an entire array called numArr into a method called CalculateMean?
CalculateMean(numArr);
400
An array declared as arr[9] has index values of
0-8
400
A sequential search continues until one of what two things happens?
The target is found or it runs out of places to look (end of array)
400
A sequential search looks for a target value in an array in what fashion?
One index at a time, in order through the array.
500
What is the main advantage of an array?
Storing large amounts of data
500
Navigating through 2d arrays requires what programming structure?
Nested loops
500
When does a for loop executing a sequential search use a break statement?
When the target is found.
M
e
n
u