21.11.  Review Questions

[ fromfile: memoryaccess-questions.xml id: memoryaccess-questions ]

  1. What is defined in the following statement?

    int* p, q;
    
  2. What is a memory leak? How does it happen?

  3. Compare the way that +, -, ++, and -- operators work on pointers with the way that they work on int or double.

  4. What happens if delete is applied to a pointer that has just been deleted?

  5. When an array is passed to a function as a parameter, what is copied onto the stack?

  6. What is dynamic memory? How do you obtain it in C++?