Programming Assignment #1: Due Wednesday Dec 7 midnight, by email
Write a module that supports operations on two stacks of characters,
in the following way:
- Stack elements for both stacks are stored in a SINGLE array
(assume array size is 100).
- Elements in the first stack are stored starting with the 1st position
in the array; elements in the second stack are stored starting with the
last position in the array.
- Print the message "stack full" when there is an attempt insert
to any of the stacks when the array is full; this occurs when
the tops of both stacks "meet".
- When a stack is empty, return the '*' character instead
of printing an error message.
Operations in the stack are done through methods called
pushone(), popone, and emptyone() for the first stack, and
pushtwo(), poptwo, and emptytwo() for the second stack.
Use the following header file .
The stacks module itself should be called twostacks.c .
Try the module on the following test programs:
Submit ONLY the source file for the module by email
to jpcvergara@yahoo.com .