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!)
I want to hold the following, suggest sensible variable types for them:
Number of chickens in the hen house
Average weight of each chicken
Speed of the car in miles per hour
Which of the following are not sensible variable names, and why:
What would be the result of the following expressions:
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 ;