Question: Question 6: What does the following statement do? code [0 ] ='A'; Question 6 options: Tests to see if element 0 of the code array
Question 6: What does the following statement do?
code [0 ] ='A';
Question 6 options: Tests to see if element 0 of the code array is equal to the letter A
Assigns the letter A to the first element in the code array
Searches through the elements of the code array to see if the letter A exists
Replaces all of the elements of the code array with the letter A
Each variable (element) in a two-dimensional array is identified by a unique combination of two subscripts, which the computer assigns to the variable when the array is created.The subscripts specify the variables ____ and ____ position in the array.
Question 7 options:
|
| row, column |
|
| header, footer |
|
| left, right |
|
| top, bottom |
What symbol do you use next to a data type to indicate an array?
Question 8 options:
|
| ( ) |
|
| [ ] |
|
| { } |
|
| | | |
What is the index of 300? int [] a = {50, 75, 100, 150, 200, 300, 450, 510, 700};
Question 9 options:
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
What is the length of the following array? int[] a = {2, 4, 6, 8, 10};
Question 10 options:
|
| 5 |
|
| 6 |
|
| 7 |
|
| 10 |
if we have the statement int k[8]; what is the value in k[4]?
Question 11 options:
|
| 0 |
|
| garbage |
|
| a space |
|
| 3 |
if we have the statement int k[8] = {1, 2, 3, 4, 5, 6, 7, 8}; what is the value in k[4]?
Question 12 options:
|
| 4 |
|
| garbage |
|
| 5 |
|
| 3 |
Question 13 (3 points)
Saved
if we have the statement int k[8] = {}; what is the value in k[4]?
Question 13 options:
|
| 0 |
|
| garbage |
|
| a space |
|
| 3 |
Question 14 (3 points)
if we have the statement int k[8] = {1, 2, 3}; what is the value in k[4]?
Question 14 options:
|
| 0 |
|
| garbage |
|
| a space |
|
| 3 |
Question 15 (3 points)
if we have the statement int k[8]; will the C statement k[14] = 44; compile?
Question 15 options:
|
| yes |
|
| no |
Question 16 (3 points)
does C do array bounds checking???
Question 16 options:
|
| yes |
|
| no |
ArraysSA
Question 17 (2 points)
given int k[5] = {2, 5, 1, 7, 9};
add the element with the value of 2 to the element with the value of 9 and store the sum in the element with the value of 2
Question 17 options:
|
| k[1] = k[5] + k[1]; |
|
| k[0] = k[5] + k[1]; |
|
| k[6] = k[5] + k[1]; |
|
| k[0] = k[4] + k[0]; |
Question 18 (18 points)
array coding matching
Question 18 options:
|
|
Question 19 (8 points)
matching definitions
Question 19 options:
|
|
Question 20 (24 points)
match the definitions
Question 20 options:
|
|
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
