You can use "time" to do this. At the command prompt, for example, "time grep foo file" will report the time to run grep. See "man time".
Note: 30 copies of these would be bad in the homework directories :-) Please do not turn in copies of these! If you have ones we should add, let me know - thanks!
Respond to the grader's comments from HW1 and 2 in HW3_LOG.
Add a "make clean" target to your makefile if you haven't already.
Fix bugs.
Step through your code in a debugger, like gdb. Record a stack trace from within one of your more deeply nested functions. Put this in a file HW3_LOG.
If you do not already, check the return code of functions like malloc and fopen.
The goal is for your program to fail gracefully on any input. If you discover that it does not, make an entry in the BUG_LOG and modify your program so that it does.
Describe the testing you did in your HW3_LOG.
3)Add assertions to your code which test conditions you believe to the true. (Use the assert function in assert.h). Everyone must add at least 5. Yes this is a somewhat arbitrary limit!
4)Identify the line or lines of code that allocate memory for each distinct word found. Say specifically what will happen if you run out of memory. How will the error be reported?
Users want the ability to pipe a file into the program. For example, "cat input_file | program". This means that you will need to handle both an input file and an stdin.