hw04 - Variables


From Linux on the GL machine:
  1. For each of the following, indicate whether they are: 1) reserved word 2) legal indentifier 3) illegal identifier
    1. void
    2. MAX_ENTRIES
    3. double
    4. time
    5. return
    6. xyz123
    7. part#2
    8. Help_me_Rhonda_Help_Help_Me_Rhonda
    9. Sue's
    10. "char"
    11. #insert
    12. G
  2. Write the following numbers in normal decimal notation
    1. 103e-4
    2. 1.2345e+6
    3. 123.45e+3
    4. Write the following decimal numbers in C scientific notation
    5. 1300
    6. 123.45
    7. 0.00426
  3. Write declaration statements that would declare and initialize variables for the following data using the datatypes of int, float or char. For example: If you are given the data   2 , the declaration statement would look like   int feet = 2;       If the data itself is not in a legal C format, say "illegal". Make sure that the variable names you pick are legal and follow conventions.
    1. 'PQR'
    2. 15E-2
    3. 35
    4. 'h'
    5. -37.491
    6. .912
    7. 4,179
    8. 'true'
    9. "T"
    10. $
    11. '$'