Chapter 7 Review Questions: 242 7.1, 7.2, 7.3, 7.4, 7.5, 7.6, 7.7, 7.8, 7.9, 7.10, 7.11 1. Demonstrate how to declare an array. 2. What is an array? 3. Demonstrate how to initialize an array. 4. Demonstrate how to set every element of an array to a specific value. 5. Demonstrate how to pass an array to a function. 6. Arrays act like call by reference. Explain how or why. 7. Demonstrate how to access a specific element of an array. 8. What is the smallest index of an array? 9. What is the largest index of an array? 10. What happens when you "blow array bounds" or access an invalid index of an array? 11. Demonstrate code to solve the following problem with an array . . . Examples: Multiply every element by twenty Output every element with some format Add twelve to every element Assign every element to be the next element (except the last?) Swap two entries (use a temp variable) 12. What is the output of the following program . . . 13. Explain partially filled arrays. - Why are they useful - How are they used - What adv. and disadv. do they have over "normal" arrays 11.7 p363-364 Review Questions: p378: 11.1, 11.16, 11.17 What is a dynamic array? What is the difference between dynamic and static arrays? Demonstrate how to declare a dynamic array? How can one tell that code uses dynamic data? Every new should have a delete for good programming practice. What is the difference between static and dynamic memory? - static memory goes on the stack and is bound at compile time - dynamic memory goes on the heap, is allocated with new, released with delete and is bound at run time