Node:Questions for Chapter 5, Previous:Storage classes, Up:Variables and declarations



Questions for Chapter 5

  1. What is an identifier?
  2. Which of the following are valid C variable names?
    1. Ralph23
    2. 80shillings
    3. mission_control
    4. A%
    5. A$
    6. _off
  3. Write a statement to declare two integers called start_temperature and end_temperature.
  4. What is the difference between the types float and double?
  5. What is the difference between the types int and unsigned int?
  6. Write a statement that assigns the value 1066 to the integer variable norman.
  7. What data type do C functions return by default?
  8. You must declare the data type a function returns at two places in a program. Where?
  9. Write a statement, using the cast operator, to print out the integer part of the number 23.1256.
  10. Is it possible to have an automatic global variable?