Course Solutions Uncategorized (Solved) : Exercise 41 40 Points Create Stack Data Elements Finish Operations Initialization Push Pop Q30120701 . . . .

(Solved) : Exercise 41 40 Points Create Stack Data Elements Finish Operations Initialization Push Pop Q30120701 . . . .

 

Exercise 4.1 (40 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) Create a stack by entering some positive integer dataelements, and end the process by entering -1, and output all theelements;(2) Get the length of the stack;(3) 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