Write a program that implements a stack with at most 30 integer elements with operations push and pop as defined
below:
A. Declare an integer array with a size of 30 elements.
B. Write a function called push that will insert an integer into the array.
C. Write a function called pop that removes the top-most element in the array.
D. Write a main function that takes input from the user based on integers: 1 - PUSH; 2 - POP; 3 - EXIT. Whenever
the user enters 1 (for PUSH), the integer that follows it is the element to be pushed.
E. The program prints as output the elements of the stack at the end of input and prints the maximum size to
which the stack grew during the operation.
Can anyone hep me with this c programming question?
That is going to be quite difficult. If you are still stuck with your project assignment may be you can contact a C expert live at website like http://askexpert.info/ .
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment