K & R Chapter 1 Study Questions

  • What does printf output if one of the formatting arguments is \t?
  • How many bits are contained in an int?
  • (T or F) A while-loop always executes the body at least once.
  • (T or F) A for-loop always executes the body at least once.
  • (T or F) Symbolic constants defined using ‘‘#define’’ must be terminated with a semicolon.
  • (T or F) printf is a part of the C language.
  • (T or F) (5/9) == 0.
  • (T or F) The programmer must know the value of EOF in order to write correct programs.
  • (T or F) It is impossible to determine the value of EOF.
  • (T or F) A for-loop must always have a body.
  • (T or F) These parts of the for-loop must be included so the program will compile correctly (initialization, test, increment step).
  • (T or F) #define can only be used for numeric constants.
  • (T or F) '\n' is a string constant.
  • What happens if you use '\b' in a printf statement.
  • (T or F) Assignment expressions have values.
  • (T or F) && represents logical AND.
  • (T or F) Functions can directly alter a variable in the calling function.
  • (T or F) ALL character strings must be terminated with '\0'.
  • (T or F) The extern keyword is a way to make global variables accessible.