Task 5 character stack bool pushcharchar st int

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: Task 4 – Printing function and Testing void printStack(int st, int size); This function takes in the stack array and size, and prints out the entire stack on the console window in one line, each number separated by a space. The element at the “open end” of the stack should be printed first. This should not print out any extra things, neither should it miss out any elements. This function is a void function, so it doesn’t have to return anything. All it does is print numbers out to the shell console. Note that the size variable is not passed by reference. This is because we don’t need to change the size variable in this function. Hence, the pass by reference is not necessary. Once you have completed push, pop, and printStack, it is...
View Full Document

Ask a homework question - tutors are online