CSC 407: Systems II

Homework 1

Due by 11:59 pm on Sunday, January 17


Reading

Read the lecture 1 notes and experiment with the code discussed there. To access the code, log into perko406.cdm.depaul.edu and copy the lecture1 directory to your home directory from my public directory /home/lperkovic/public/ as follows:
$ cp -r /home/lperkovic/public/lecture1 .

Assignment

Log into perko406.cdm.depaul.edu (as shown in the lecture notes) and copy zipped file hw1.zip from /home/lperkovic/public/ to your home directory. For example:
$ cp /home/lperkovic/public/hw1.zip .
The file hw1.zip will be in your current directory:
$ ls
hw1.zip
Now unzip the compressed file
$ unzip hw1.zip
Archive:  hw1.zip
   creating: hw1/
  inflating: hw1/Makefile           
  inflating: hw1/hw1.c
  inflating: hw1/data.txt
and move to newly created directory hw1:
$ cd hw1/
In this directory you will find C file hw1.c that you will work on and file Makefile which contains the UNIX shell command that will submit your completed homework to the dropbox on the Linux box:
$ ls
data.txt hw1.c  Makefile
Open file hw1.c for editing using the editor of your choice (emacs, vi, nano, ..) and do the homework using the instructions below. When done, submit the homework as follows:
$ make submit
chmod 600 hw1.c
cp -i hw1.c /home/lperkovic/dropbox/hw1-`whoami`.c
Notes:
  1. DO NOT MODIFY THE NAME OF THE FILE hw1.c. The command make submit will submit to the dropbox a file called hw1.c and no other.
  2. You may submit multiple times but each submission will overwrite the previous one.
  3. Do not modify file Makefile.

Problem

1.    File hw1.c contains skeleton code that you will complete as follows: