The stack has a fixed capacity and the stack cannot

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ushing 230 onto the stack: 3 5 12 125 23 230 - - - - - - - - Popping from the stack: 3 5 12 125 23 - - - - - - - - - - The popped number is 230 As you can probably see, there are a few basic obvious rules to a stack. The stack has a fixed capacity, and the stack cannot contain more elements than its capacity. Also, you cannot pop anything from an empty stack. You, as the programmer will need to implement these rules into your code, and make two very basic functions that will operate on a stack. The memory for the stack will come from an array. You are strongly recommended to open up the lecture slides from the last lecture and consult them if you seem to get stuck. Those will greatly help you during this lab. Do all your work for this...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online