memory_count business.
Due date:
Late assignments will be penalized 10% per day, and will not be
accepted after
.
Name, Student Number, Assignment Number, Course Number (T26)
Assignments which are not in an envelope will not be marked
Deposit your envelope in
.
Your program must conform to the programming standards. These are described in a separate sheet.
You must use the given parts of the program without changing
them. For example, all memory management must be done using
the given procedures get_memory and
return_memory - do not directly use C's built-in
procedures malloc and free.
In this assignment, you are given the main program, the memory management procedures, and a type definition of `stack' (and related types). These are available on a disk file that you can copy (so you don't have to type it in) - ask your teaching assistant where and how to obtain this.
Note that the main program writes out the variable
memory_count as its last action. If this value is not 0,
you have bugs to fix.
push operation using
before and after node-and-arc diagrams, as described
in class.
stack implement the
abstract data type `stack' specified in class. Unlike Assignment 1,
this will be a linked implementation using C's pointers.
To test your program use the given main program and procedure
called read_and_evaluate_expression. This procedure will
work with any implementation of stacks that conforms to the
specification.