Name: ____________________________________________________ Alpha: _____________ Section: ________

Describe help received: _________________________________________________________________

See the bottom for how to submit your work.

Due: Before 0800 on next class day

  1. (10 pts) Read today's lecture notes. Honestly declare how you read the notes.
    1. (10 pts) I read the notes carefully. I have a good understanding of the topics therein.
    2. (10 pts) I read the notes carefully, but I don't really understand the following points well:
      
      
      
      
    3. (0 pts) I didn't read the notes carefully.
  2. [20pts] Assuming the following function prototypes and variable definitions, fill in the table. Write ERROR if the expression cannot be compiled correctly.

    Note: each expression should be taken as independent. I.e. if one expression modifies some variable values, those modifications do not carry over to the next expression.

    
    // Function prototypes - each function what the name says it does
    int abs(int j);            // returns "absolute value" of j.  defined in library cstdlib
    double round(double x);    // returns x rounded to nearest integer. defined in library cmath
    string to_string(int val); // returns string representing val. defined in library string
                               
    // Variable definitions
    int k = 3;
    double x = -3.8;
    string s = "The number of cookies I need: ";
    
    expressiontypevalue
    k + abs(x)
    x + abs(k)
    round(x) + k
    abs(x) = k
    k = round(x)
    s + to_string(k + 5)
    to_string(int(round(x)))
    (3 + 10)/round(x - 1)
    to_string(1) > to_string(2)
    to_string(1) + 3
Bring to class