Node:Questions for Chapter 11, Previous:Nested loops, Up:Loops



Questions for Chapter 11

  1. How many kinds of loop does C offer, and what are they?
  2. When is the condition tested in each of the loops?
  3. Which of the loops is always executed at least once?
  4. Write a program that copies all input to output line by line.
  5. Write a program to get 10 numbers from the user and add them together.
  6. Rewrite the nested loops example to print a square with while loops instead of for loops.