Skip to content
Snippets Groups Projects

Add stack_print(stack) function

Merged boris.stefanov requested to merge 12-add-print-function into main
1 unresolved thread
1 file
+ 2
0
Compare changes
  • Side-by-side
  • Inline
+ 2
0
@@ -18,6 +18,8 @@ void stack_peek(stack s, int *value){
}
void stack_print(const stack s) {
//TODO: replace if statement with following as soon as relevant function is implemented
//if (!stack_is_empty()) {
if (s.top >= 0) {
printf(" TOP\n--------------------\n");
for (int* spot = s.data + s.top; spot >= s.data; --spot) {
Loading