In these exercises you must use the notes above to come up with answers to the questions below (no peeking at the answers in advance!)

  1. I want to hold the following, suggest sensible variable types for them:

  2. Which of the following are not sensible variable names, and why:

  3. What would be the result of the following expressions:

  4. Explain the value that the variables would have after the following C had been obeyed:

/* equation A */
int i, result ;
i = 0 ;
result = i + 1 ;

/* equation B */
int i = 1, result ;
result = ++i ;

/* equation C */
float x ;
x = 7 / 2 ;

/* equation D */
float x ;
int i ;
x = 7.0 / 2.0 ;
i = x ;