Exercises for randurl
The initial exercise:
- Copy rand.html,
names.txt, and
randurl.c to your directory.
- Rename randurl.c to be randurl-$sno$.c.
$sno$ is your student number.
- Modify randurl-$sno$.c to refer to your copy of
name.txt in your directory (i.e. alter RANDS and
HOME).
- Compile randurl-$sno$.c on fivedots:
(i.e. gcc -Wall -o randurl-$sno$ randurl-$sno$.c).
- Copy it to the student CGI directory on
- Modify your rand.html to refer to randurl-$sno$
- Try executing randurl-$sno$ via rand.html.
A further exercise:
- Modify your names.txt so that other kinds of URLs are
chosen by randurl-$sno$
Back to the Main Random URL Page