CSC3320 Assignment 4 25 points due 3/22/02 Dr. Harrison Spring 2002

This assignment consists of two C programs and an C-shell script. When complete it should be emailed to the GTA in ONE email (use either attachments (preferred -use pine) or a tar file). His account is slp40@yamacraw.cs.gsu.edu. Printed copies of the files should also be handed to me.



  1. Write a program that uses the stat function and reports in a human readable form all of the information that stat returns. Stat takes a struct and fills it with data; you will have to find out what this structure is.



  1. Write a program to determine how fast the machine is. It should use the clock() function and time a for loop that adds two floating point numbers together 1 million times. Time addition, multiplication, division and sqrt.

  1. Write a C-shell script to find the largest file in the current directory that doesn't already end in gz. Invoke gzip on that file. The easiest solution to this problem invokes a small awk script. The man page on awk describes all of the awk functions you need for this.