CS 284 Operating Systems
Programming Assignment #2

Due: 1/24/2001 - Class Time

Write a C program using all 3 arguments available to main(int argc, char * argv[], char * env[] ).

Your progam should perform the following tasks:

  1. Loop thru the argv array printing each command line argument that you supplied - appropriately labeled
  2. Loop thru the env[] array printing
  3. Print a count of how many env variables there were


=================================================================

You will use the 'script' command to capture all necessary information for handin.  You do that by
starting the script command "script myHandin2"
cat your source.c program
run your program
exit
Remove the ^Ms from the script file.
a2ps myHandin2  |  lpr -P yourPrinterPreference