The file testlock.c demonstrates the basic use
of fopen, fprintf and fclose. As usual, you should print
the man pages for all system calls you think you might need
for this homework.
3.
Here's one nuisance. If you use filetest to create
a very large number of files, then you might not be able to
remove them with rm. I have provided a script called
rm.tcl that you can use if you get into trouble.