1/51
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
In a fixed-length array the size of the array is known when the program is written.
T
Arrays must be declared and defined before they can be used.
T
Array declarations will determine the type, name, and size of the array
T
For a value to be potentially used as an index it must be an integral value or an expression that evaluates to such.
T
The name of an array is a reference to the address of where it begins inside the memory of the computer.
T
The index value represents an offset from the beginning of the array to the element being referenced.
T
Declaration and definition of an array will include a default initialization of all elements.
F
Declaration and definition of an array will not include a default initialization of all elements.
T
If the number of values provided for initialization of an array is fewer than the size of the array then the
remaining elements have no known value.
F
If the number of values provided for initialization of an array is fewer than the size of the array then the
remaining elements are zeros.
T
The address operator is not necessary in a scanf to accept input for an individual array element when using the
indexing technique.
F
The address operator is necessary in a scanf to accept input for an individual array element when using the
indexing technique.
T
When accessing an array element the C language does not check whether the index is within the boundary of an
array.
T
Arrays can be passed in two ways; by individual elements or the whole array.
T
Elements of an array, themselves individual values of a given data type, are passed by value from calling to
called function.
T
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.
T
Individual elements of an array can be passed by address through the use of the address operator
T
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.
T
The name of an array is a primary expression whose value is the address of the first element in the array.
T
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.
T
Passing the array name to a function allows changes in the called function to be available back in the calling
function after it terminates.
T
When passing a whole array to the function the total size of the array is necessary in the function call.
F
When passing a whole array to the function the total size of the array is not necessary in the function call.
T
When passing a whole array to the function the total size of the array is necessary in the definition of the called
function.
F
When passing a whole array to the function the total size of the array is not necessary in the definition of the called
function.
T
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.
T
It is a course standard to make use of a symbolic/defined constant to represent the size of a statically declared
array.
T
The conversion code to use for input or output of an array element depends on the data type of the array.
T
Variables and loops are commonly used together to generate index values to access the elements of an array.
T
Arrays in the C programming language use a one-based index.
F
Arrays in the C programming language use a multi - based index.
T
To pass the whole array to a function you need to use the name of the array followed by empty square braces []
in the function call statement.
F
To pass the whole array to a function you need to use the empty square braces []
in the function call statement.
T
All elements of one array can be assigned to another through the use of the assignment operator and the name of
each array (example: x = y).
F
All elements of one array cannot be assigned to another through the use of the assignment operator and the name of
each array (example: x = y).
T
While the default technique of passing array elements is by value it is possible to pass elements by address using
the & operator (and the * operator in the function being called).
T
If more than one element of an array is passed to a function in a single function call then those elements are
passed by address.
F
If more than one element of an array is passed to a function in a single function call then those elements are
passed by value
T
Using the name of an array in the data list of a single printf function will result in the output of all elements of
the array.
F
To pass the whole array to a function you need to use the empty square braces []
in the function call statement.
F
All arrays sent to a given user-defined function must be of the same defined size.
F
All arrays sent to a given user-defined function may not be of the same defined size.
T
What is the value found at index 4 in the array after the code segment below has been executed?
int x[5];
int i;
for(i = 0; i < 4; i++)
{
x[i] = 2 * i - 1;
}
There would be only junk values because the array is not initialized.
All elements of one array cannot be assigned to another through the use of the assignment operator and the name of each array (example: x = y).
T
Declaration and definition of an array will include a default initialization of all elements.
F
The address operator is not necessary in a scanf to accept input for an individual array element when using the indexing technique.
F
The name of an array is a primary expression whose value is the address of the first and last element in the array.
F
If the number of values provided for initialization of an array is fewer than the size of the array then the remaining elements are assigned a value of zero.
T
What are the values in the array after the code below has been executed?
int x[5] = {2, 5, 7, 3, 1};
int i;
for(i = 1; i <= 4; i++)
{
x[i - 1] += x[i];
}
7 12 10 4 1
When accessing an array element the C language does not check whether the index is within the boundary of an array.
T
Individual elements of an array cannot be passed by address.
F
When passing a whole array to the function the total size of the array is necessary in the definition of the called function.
F