CS 215 UNIX C Programming

Assignments


Week 1

  • Read for next week: Chapters 1 through 4.
  • Program example from page 46.
  • Objectives: enter program in text editor (vi or pico), save on server (CRUX), compile in UNIX, run program.

Week 2

  • Read for next week: Chapter 5.
  • Programming assignment: Program 2 from Chapter 3
  • Quiz on Chapters 1 - 4 postponed to week 4.

Week 3

  • Read for next week: Chapter 6.
  • Programming assignment: Chapter 5, Exercise 3.

Week 4

  • Read for next week: Chapter 7.
  • Programming assignment: Chapter 6, Exercise 8.

Week 5

  • Read for next week: Chapter 8.
  • Programming assignment: Chapter 7, Exercise 1. You may not simply use three if statements.
  • Quiz next week on Chapters 5 - 7.

Week 6

  • Read for next week: Chapter 9.
  • Programming assignment: Chapter 8, Exercise 4
  • Extra Credit Assignment:
    1. Your program should read to End of File, not to # sign.
    2. Keep track of how many of each letter of the alphabet are used.
    3. Report the count of each letter to the user.

Week 7

  • Read for next week: Chapter 10.
  • Programming assignment: Chapter 9, Exercise 5
    1. The program must ask the user for the two values.
    2. The program must save the values in variables in the main function.
    3. The program must pass the addresses of the variables to another function.
    4. The second function must calculate the sum and difference between the two numbers.
    5. The second function must receive the addresses in pointers and change the values of the original variables by indirection.
    6. Test on Chapters 8 and 9 next week.

Week 8

  • Read for next week: Chapter 11.
  • Programming assignment: Chapter 10, Exercise 5, with changes:
    1. The program must ask the user for the ten values.
    2. The program must save the values in an array in the main function.
    3. The program must pass the address of the array to another function.
    4. The second function must receive the address in a pointer and calculate the largest value, the smallest value and report them.

    Week 9

  • Read for next week: textbook through Chapter 11.
  • No new programming assignment, due to winter storm.
  • Finish all outstanding assignments, prepare for quiz next week.