This is a list of some practice questions and problems for the first quiz. I encourage you to first, read the sections, and then try review problems in the book. When that is complete, you should try these problems and understand their solutions. This set of quiz questions is not a complete list (and some of the questions are half-formed, so there is no guarantee that any of these will appear on the quizzes). This quiz covers chapter 7 through section 7.8. ------------------------------------------------------------------ Short Answer Questions ------------------------------------------------------------------ 1) Explain how to determine if a C++ program uses dynamic memory. 2) Name at least two major advantages to using dynamic arrays over static arrays. 3) Name a major disadvantage of using dynamic arrays over static arrays. 4) What is the dereferencing operator? 5) What does the dereference operator do? 6) What is the "address of" operator? 7) Convert the following code to use dynamic arrays instead of static arrays. //code for this problem would go here 8) Find the errors in the following code: //code for this problem would go here 9) Demonstrate how to declare a dynamic array (of a specific type) with size input by the user. 10) Why do arrays act like call by reference? 11) Why does every new require a delete? 12) What is the keyword 'new' used for in C++? 13) What is the keyword 'delete' used for in C++? 14) Show a function prototype that passes a dynamic array. 15) What is NULL and how is it used? 16) Demonstrate, in code, how to declare an array with a size determined by the user of the program. ------------------------------------------------------------------ True or False example questions (some of the statements below are true and some are false) ------------------------------------------------------------------ a) Arrays act like call by reference because arrays are dynamic. b) Array names are pointers. c) Static arrays are declared with new. d) Static arrays are declared with a constant size that must be determined at compile time. e) Dynamic memory goes on the heap. f) Dynamic memory does not go on the heap. g) Dynamic memory is destroyed at the end of a function or code block. h) Dynamic memory is not destroyed at the end of a function or code block.