Problem 1
Mark the following statements as true or false.
a.
Problem 2
Consider the following declaration: double salary[10]; In this declaration, identify the following: a. The array name. b. The array size. c. The data type of each array component. d. The range of values for the index of the array.
Problem 3
Identify error(s), if any, in the following array declarations.
a. int
Problem 4
Determine whether the following array declarations are valid. If a declaration is invaid, explain why. a. int 1 ist 75; b. int size; double list [size]; c. int test [-10]; d. double sales [40.5];
Problem 5
What would be a valid range for the index of an array of size
Problem 6
Write
Problem 7
What is the output of the following program segment?
int temp [5]
\[
Problem 8
Suppose list is an array of five components of type int. What is stored in
list after the following
Problem 9
Suppose list is an array of six components of type int. What is stored in 1
ist after the following
Problem 10
Correct the following code so that it correctly initializes and outputs the elements of the array. myList; int myList[10]; for (int i = 1; i <= 10; i++) cin >> myList; for (int i = 1; i <= 10; i++) cout << myList[i] << " "; cout << endl;