Stack in C programming
Write push(), pop(), isFull() and isEmpty() functions for an integer stack. Create a menu-driven program that repeatedly takes one of the following four options as input: 1, 2 ,3 or 4 for PUSH, POP, DISPLAY and EXIT respectively, and performs the appropriate sequence of actions. Note that DISPLAY prints stack elements in order from A[0] up to A[TOP]. Test input will comprise of a series of PUSH/POP followed by DISPLAY and EXIT. Any attempts to PUSH onto a full stack or POP from an empty stack should be simply ignored by your program, i.e., it should not even print any error message. Assume that the maximum stack size is 10 elements. Example input: 1 10 1 20 1 30 2 3 4 (Meaning: Push 10, Push 20, Push 30, Pop, Display Exit) Output: 10 20