Chapter 5 (Functions) First look at the end of sections in Chapter 5. These have valuable "test your knowledge" questions that are similar and useful in preparation for this exam. The Liang website is also invaluable. Some example questions. Remember that during the test you will need to use good programming practices throughout. There may be question 'types' that are not listed below, but this is a good sample. Again, you should also go over the review problems in the book for the chapters we have covered - as well as read any portions of the chapters you may have missed. Some problems will likely come directly from those as well. Some sample questions: What is #include used for? Name some functions in cmath. Name two libraries used in #include. What is a function prototype? Give the function prototype for the following situation? Give the function definition for the following situation? -function basics (definition, prototype, location, calls, arguments) Find all errors (run-time and compiler) in the following code. (code would follow) Given the following snippet of code, what is the output? (code would follow) Give C++ code for the following pseudocode. (pseudocode would follow) Give C++ code for the following problem statement. (a problem statement would follow) Give pseudocode for the following problem statement. (a problem statement would follow) What does the following code do? What are the values of all variables at the end of its execution? (code would follow) Give a function definition for . . . Give a function prototype for . . . What is pass-by-value? What is pass-by-reference? When is pass-by-value used? When is pass-by-reference used? Compare and contrast pass-by-value and pass-by-reference? What is the scope (where can it be used) of this variable? Show how to call this function. What is a return type? What is a void function? What does the following function do . . . Chapter 6 - Added for additional questions involving call by reference Review Questions p208 6.1, 6.3, 6.5 Chapter 7 Review Questions: 242 7.1, 7.2, 7.3, 7.4, 7.5, 7.6, 7.7, 7.8, 7.9, 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 . . .