Self Test Questions

 < Day Day Up > 



  1. An array is a ______________ allocation of memory to _____________ objects.

  2. A static array name is what type of pointer?

  3. (T/F) An array name points to the first element of the array.

  4. How are multi-dimensional arrays stored in memory.

  5. Multi-dimensional arrays are arrays of ______________.

  6. What determines the size of an allocation unit?

  7. How does a dynamically allocated array differ from a statically allocated array?

  8. List at least four types of objects an array can contain.

  9. Describe the two methods available to access array elements.

  10. To what values will the array elements be initialized to in the following declaration:

    int int_array[25];
  11. To what values will each array element be initialized to in the following declaration:

    int int_array[25] = {1,2,3};
  12. What’s the difference between the new operator and the new[] operator?

  13. Why is it important to release dynamically allocated array memory with the delete[] operator?

  14. List and discuss the steps required to create a single dimensional dynamic array.

  15. Discuss the two methods for creating multi-dimensional dynamic arrays. Which method would you prefer to use and why?



 < Day Day Up > 



C++ for Artists. The Art, Philosophy, and Science of Object-Oriented Programming
C++ For Artists: The Art, Philosophy, And Science Of Object-Oriented Programming
ISBN: 1932504028
EAN: 2147483647
Year: 2003
Pages: 340
Authors: Rick Miller

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net