Course Solutions Uncategorized (Solved) : Exercise 42 30 Points Create Stack Data Elements Finish Operations Initialization Push Pop Q30120703 . . . .

(Solved) : Exercise 42 30 Points Create Stack Data Elements Finish Operations Initialization Push Pop Q30120703 . . . .

 

Exercise 4.2 (30 points)Create a stack with some data elements, and finish suchoperations as initialization, Push, Pop, etc.All operations should be implemented as independent functions,which can be called by the main function.(1) data elements, and end the process by entering -1, andoutput all the elements;(2) Get the length of the stack(3) Add a new data element into the stack;(4) Delete a data element from the stack, and output the datavalue#include <stdio.h>#include <stdlib.h>#include <malloc.h>#define ERROR 0#define OK 1#define TRUE 1#define FALSE 0typedef int SElemType;typedef int Status;

Expert Answer


An answer will be send to you shortly. . . . .

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post