CS 120 - Lab Assignments

  1. DO NOT USE INTERNET EXPLORER IN THIS CLASS. (Unless instructed to do so. Even then, question it!)
  2. When downloading files for the lab DO NOT save the web page, save the file. To save the file with Firefox, right-click on the link and choose "Save Link As..." This is so that all of the formatting in the file is preserved.
  3. Don't forget that you may need to use the --strip-trailing-cr switch with diff if it's telling you that all of the lines are different and you know they are not. This will happen because Windows uses different end-of-line characters than Linux or Mac OS X. The --strip-trailing-cr option tells diff to ignore the differences in line endings.
  4. Online submission page for the labs. Your username and password are the same as your Digipen login.

    All code for the labs MUST follow the Style Guide for CS120. The tablen program must be run on your files, as well.

  5. In order to help automate the testing of your code, the submission server will use input/output redirection. If you understand this simple concept, it will help you automate your own testing.

    Normally, output (e.g. printf) sends its output to the screen. To send it to a file instead, use the greater-than (>) symbol:

    myprogram > out.txt
    Any output from myprogram will go to a file named out.txt and you will see nothing on the screen.

    Normally, input (e.g. scanf) is read from the keyboard. To have the program read input from a file instead, use the less-than (<) symbol:

    myprogram < in.txt
    All input to myprogram is read from in.txt, and the keyboard is ignored. Also, none of the characters that are in the file will show on the screen.

  1. No lab during the first week
  2. Lab Week #2 - Due Friday, September 16, 2016 at 12:00 noon (marathon.c)
  3. Lab Week #3 - Due Sunday, September 25, 2016 at 6:00 pm (numbers.c)
  4. Lab Week #4 - Due Sunday, October 2, 2016 at 6:00 pm (fibonacci.c)
  5. Lab Week #5 - Due Monday, October 10, 2016 at 10:00 pm (triple_cubes.c)
  6. Lab Week #6 - Due Monday, October 17, 2016 at 10:00 pm (primes1.c)
  7. Lab Week #7 - Due Monday, October 24, 2016 at 10:00 pm (sieve.c)
  8. Lab Week #8 - Due Monday, October 31, 2016 at 10:00 pm (calendar.c)
  9. Lab Week #9 - Due Monday, November 7, 2016 at 10:00 pm (histogram.c)
  10. Lab Week #10 - Due Tuesday, November 15, 2016 at 10:00 pm (tablen.c)
  11. Lab Week #11 - Due Friday, November 25, 2016 at 10:00 pm (grades.c)
  12. Lab Week #12 - Due Friday, December 2, 2016 at 10:00 pm (list.c)
  13. Lab Week #13 - (Optional extra credit) Due Friday, December 9, 2016 at 10:00 pm (dumpit.c)