1
A named block of code that performs a task and can be reused is called
A function
B return value
C array
D index
What looks wrong with Question 1?
Send anonymously
Cancel
2
The first index of an array is
A 1
B 0
C the length
D the last value
What looks wrong with Question 2?
Send anonymously
Cancel
3
An array holds the values [10, 13, 16, 19, 22, 25]. The value at index 2 is ____
What looks wrong with Question 3?
Send anonymously
Cancel
4
The graph shows array values by index. The value at index 2 is ____
What looks wrong with Question 4?
Send anonymously
Cancel
5
A value passed into a function is called
A array
B index
C parameter
D element
What looks wrong with Question 5?
Send anonymously
Cancel
6
A function is useful mainly because it
A makes code run slower
B removes all variables
C stores data on disk
D lets code be reused
What looks wrong with Question 6?
Send anonymously
Cancel
7
An array holds the values [10, 13, 16, 19, 22]. The value at index 0 is ____
What looks wrong with Question 7?
Send anonymously
Cancel
8
The graph shows values increasing with index. The pattern is
A increasing by 10 each index
B decreasing by 10
C staying the same
D doubling each index
What looks wrong with Question 8?
Send anonymously
Cancel
9
A value sent back by a function to its caller is called
A index
B return value
C element
D scope
What looks wrong with Question 9?
Send anonymously
Cancel
A a value returned only
B an array length
C a value passed into a function
D a file name only
What looks wrong with Question 10?
Send anonymously
Cancel
11
An array holds the values [10, 13, 16, 19, 22, 25, 28]. The value at index 4 is ____
What looks wrong with Question 11?
Send anonymously
Cancel
12
An ordered collection of values stored under one name is called
A element
B scope
C modularity
D array
What looks wrong with Question 12?
Send anonymously
Cancel
13
If an array has 5 elements, its valid indexes are
A 0 to 4
B 1 to 5
C 0 to 5
D 1 to 4
What looks wrong with Question 13?
Send anonymously
Cancel
14
A function that returns the larger of two numbers is called with 7 and 3. The value returned is
What looks wrong with Question 14?
Send anonymously
Cancel
15
The position of a value in an array, starting at zero is called
A scope
B index
C modularity
D library
What looks wrong with Question 15?
Send anonymously
Cancel
16
Modularity helps a program by
A making it longer
B removing functions
C making parts easier to test and reuse
D hiding all errors
What looks wrong with Question 16?
Send anonymously
Cancel
17
A function with no return value is best described as a
A procedure
B variable
C array
D constant
What looks wrong with Question 17?
Send anonymously
Cancel
18
One value stored in an array is called
A modularity
B library
C call
D element
What looks wrong with Question 18?
Send anonymously
Cancel
A sent back to the caller
B printed always
C stored on disk
D ignored by code
What looks wrong with Question 19?
Send anonymously
Cancel
20
The values passed to a function when it is called are called
A parameters or arguments
B local variables only
C return values
D global constants
What looks wrong with Question 20?
Send anonymously
Cancel
21
The part of a program where a variable can be used is called
A library
B scope
C call
D function
What looks wrong with Question 21?
Send anonymously
Cancel
22
A variable is declared inside a function. A second function tries to use that variable. What happens?
A It works anywhere
B It fails, the variable is local to the first function
C It works in every function
D It works only before the first function runs
What looks wrong with Question 22?
Send anonymously
Cancel
23
Breaking a program into smaller reusable parts is called
A call
B function
C modularity
D parameter
What looks wrong with Question 23?
Send anonymously
Cancel
24
A program calls a function to calculate an area three times with different inputs. The main advantage of using the function is that the code is
A written once and reused
B run slower
C harder to read
D longer
What looks wrong with Question 24?
Send anonymously
Cancel
25
A collection of ready made functions for use in programs is called
A function
B parameter
C return value
D library
What looks wrong with Question 25?
Send anonymously
Cancel