Classwork 6: Functions & Call Stack

Thursday, July 19, 2012     


[Previous Classwork] [Next Classwork]


Complete the following:

  1. Ensure the machine is booted into Linux
  2. Login to Linux
  3. Open a termimal from the top left Applications menu -> System Tools -> Terminal
  4. Create a directory called cw06 to store this classwork
  5. Go into your new cw06 directory
  6. Copy the file buggy_functions.c to your cw06 directory.
  7. Rename your this C file cw06.c
  8. Insert a comment for the header based on the template below into cw06.c:

    /*   File: cw06.c
         Name: A. Student
         Username: astudent1
         Date: 10/24/07
         Description: ...
    */
    

  9. Start off by debugging this code and fixing all warnings and syntax errors that you find. This will take multiple compile attempts to complete them all.
  10. Once you have removed all the syntax errors and warnings, you will need to fix the semantics of the program. If you have never read this Dr. Suess book, ask someone in class to help with the correct ordering of the phrases.
  11. Once you are sure the program is done and working well, start a script using script
  12. Once the script is running, show the compiling of your program, and then running.
  13. Exit from the script, which will save the log typescript
  14. Once you are done, use submit to submit two files, cw06.c and typescript

    linux3[26]% submit cs104 cw06 cw06.c typescript
    

  15. After submitting your files, you can verify your files were submitted by using the submitls command as shown below

    linux3[26]% submitls cs104 cw06
    

  16. MAKE SURE YOU LOGOUT AFTER SUBMITTING THE ASSIGNMENT AND BEFORE LEAVING CLASS!