Chapter Summary
Review Questions
1. | What is defined in the following statement? int* p, q;
|
2. | What is a memory leak? How does it happen? |
3. | How do the +, -, ++, and -- operators work differently on pointers versus regular numbers? |
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 being copied onto the stack? |
6. | What is dynamic memory? How do you obtain it in C++? |
7. | What happens when a program runs out of memory? How can a program recover from such a situation? |
8. | Under what situations is it appropriate to check whether a value from new is null? |
Категории