Name: ____________________________________________________ Alpha: _____________________

1. [20pts] Assume the following delcarations and function definitions fill in the table. Note: "error" is a possiblity! Note: each question is independent, i.e. no side effects of one expression shoudl eb taken to carry over to the next
```double x = 2.25;
int n = 2;
string s = "hard";
int *A = new int[3]
A[0] = 6; A[1] = 9; A[2] = 8;
string *B = new string[2];
B[0] = "hi"; B[1] = "bye";
double *X = new double[3];
X[0] = 5.1; X[1] = 5.4; X[2] = 5.7;

double sqr(double z) { return z*z; }

bool absme(int& k)
{
if (k < 0)
{
k = -k;
return true;
}
return false;
}
```
 expression type (or error!) value (or error!) `X[0]` `A[1] - x` `A[0] = X[n]` `++A[2]` `B[1][0]` `A[1] + X[1]` `sqr(A[0])` `sqr(X[0])` `absme(A[0])` `absme(X[0])this is tricky!`
2. [80Pts] Write a program that reads a number `n` from the user, reads an `n`-word sentence from the user, and then prints out the sentence in reverse (but not the words). A typical run of the program might look like this:
```~/\$ ./prog
Number of words: 3
Sentence: Sam I am
am I Sam```
Use arrays not recursion! Turn In this cover sheet (obviously) and a printout of your program along with a screen capture showing it running on some clever sentence.