Home > Back-end >  Be urgent! Such as online!!!!!
Be urgent! Such as online!!!!!

Time:10-01

The existing order of the stack are defined as follows:

# define MAXSIZE 50

# define TRUE 1

# define FALSE 0

Typedef char ElemType;

Typedef struct

{

ElemType data [MAXSIZE];//the elements in the array data storage stack

Int top;//the stack pointer to stack the stack element subscript

} SqStack;

Written in C language algorithm to achieve the following:

(1) creates an empty stack, namely stack initialization, create returns TRUE on success, or FALSE on failure

(2) into the stack operation, the element is inserted into the stack, e returns TRUE on success, or FALSE on failure,

(3) the stack operation, returns TRUE on success, or FALSE on failure

  • Related