----------------------------------------------------------------- Chapter 17 (541-564) Summary: 560 Review Questions (all but 17.12) 560-562 Answers are in the Chapter 8 section of: http://www.cs.armstrong.edu/liang/cpp/c++testing.html Additional Questions follow: ---------------------------------------------------------------- 1) What is a recursive function? 2) What are the base cases of a recursive function? 3) What is the 'winding up' and 'winding down' of a recursive function? 4) How is the stack used in recursive functions? 5) Is recursion faster than iteration? Explain. 6) What is the difference between recursion and iteration. 7) Write code for this recursive function . . . 8) What is the output of the following code . . . 9) What is the error in the following code . . . 10) What is stack overflow in recursive functions? 11) Can all recursive functions be rewritten iteratively? Why not or how? 12) What is necessary to re-write all recursive functions iteratively? 13) What is a stack trace? 14) Demonstrate a stack trace on . . . ------------------------------------------------------------------- Structs are not available in the Liang text: Use: online resources as an additional guide beyond notes and samples from class. Here is one such link: http://www.cplusplus.com/doc/tutorial/structures/ ------------------------------------------------------------------- -) What does the C++ keyword struct do? -) Demonstrate in code how to make a struct. -) Design a struct for ... -) Demonstrate the proper way to define a struct.