linktool.h, linktool.c, linktest.c) to your directory using the following command (notice there is a space and a period at the end of the command):
cp /cs/cs2301-b11/labs/lab6/* .
If you now list the files in your directory, you should see entries for
linktool.h, linktool.c, and linktest.c.
linktool.c and linktest.c contain these include
directives:
linktool.c
#include "linktool.h"
linktest.c
#include "linktool.h"
Using this information, create a makefile to generate an executable
program called linktest. Compile your program by running make.
lists_are_equal() in linktool.h.
What does it mean for two lists to be equal? We will define equality
to mean that
You need to write the function lists_are_equal() and put your solution
in linktool.c (you will find a stub for the function at the end of linktool.c). Your solution must be recursive.
You should define the base cases first (the cases that will stop the
recursive calls and return 1 (true) or 0 (false) to the calling function).
What are the base cases for lists_are_equal()? There are three of them:
Once you have defined the base cases, you should then define the general (recursive) case. Remember, you want each successive recursive call to reduce the "size" of your problem.
linktest. Run the test program to see if your function works correctly.
/cs/bin/turnin submit cs2301 LAB6 linktool.c makefile
This is the last lab. Good luck with your finals.