Lab Exercise 11 July 2005

There will be no classes this evening but you are instructed to work on the following items. You may work in the lab until 8pm tonight. You do not need to submit anything for this lab exercise although there will be a quiz next Monday (July 18) based on these items.
  1. Download arrays.c and compile under Dev C++. Update the program so that MAX is 20 instead of 10 and observe what is printed out. Change SIZE to 10 instead of 12 and observe what is printed out. Can you explain why those numbers were printed out?
  2. Download and compile mem.c and make sure you understand why the resulting printout occurs.
  3. The program std.c computes the standard deviation of 10 numbers. Update the program so that it first asks for the size of the sample before it takes in the numbers. Instead of a fixed array, use malloc to allocate space for the numbers.