November 2001
Beginner
1128 pages
29h 12m
English
| 1: | How would you declare each of the following?
|
| A1: |
|
| 2: | Declare an array of five ints and initialize it to the first five odd positive integers. |
| A2: |
int oddly[5] = {1, 3, 5, 7, 9};
|
| 3: | Write a statement that assigns the sum of the first and last elements of the array in question 2 to the variable even. |
| A3: |
int even = oddly[0] + oddly[4]; |
| 4: | Write a statement that displays the value of the second element in the float array ideas. |
| A4: |
cout << ideas[1] << "\n"; // or << endl; |
| 5: | Declare an array of char and initialize it to the string ... |
Read now
Unlock full access