Name: ____________________________________________________ Alpha: _____________________

Describe help received: _________________________________________________________________

  1. [20pts] Assume the following declarations and next to each expression, write either the type, or "error."
    double x;
    string s;
    double *A;
    int **M;
    string **W;
  ------------ ------
  expression   type
  x          
  s          
  A          
  M          
  W          
  x[0]       
  s[0]       
  A[0]       
  M[0]       
  W[0]       
  x[0][0]      
  s[0][0]      
  A[0][0]      
  M[0][0]      
  W[0][0]      
  x[0][0][0]   
  s[0][0][0]   
  A[0][0][0]   
  M[0][0][0]   
  W[0][0][0]   
  -------------- ------
  1. [80Pts] Write a program that will define (that means declare, allocate, initialize, etc) the 2D array shown in the diagram below. This should happen using a series of functions - the first should allocate the array, returning it to main, the second should initialize the array with the values from the image, and the third should print the values out, so they are printed in increasing order. Finally, the array should be completely destroyed.

Turn in this sheet, along with a screenshot showing your program running, and a codeprint printout (in landscape please!) of your code.