Array Exercises

1. Declare an array named IQ to store the following data: 90, 119, 80, 101, 99, 130, 167, 125, 132, 75

 


2. Write a for loop to print out all the data in the IQ array.

 


3. What would the following code print?
int A = IQ[0] + IQ[3];
cout << A;

 

4. What would the following code print?
int B = 5;
cout << IQ[B];
B++;
cout << IQ[B];


5. Declare an array named DAYS to store the following data: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday

 


6. Write a cout statement to print out: Monday Wednesday Friday


 

7. Declare an array named Temps to store the following temperatures: 95.4, 101.5, 79.6, 69.5, 81.9, 100.1

 


8. Write a for loop to sum up all the temperatures.