2. The structure part code:
Typedef struct node
{
int data;
Struct node * next;
} StackNode, * LinkStack;//define the stack structure
LinkStack Init_LinkStack ()
{
return NULL;
}//initializes the
Function: (a)
LinkStack Push_LinkStack (LinkStack top, int x)//into the stack
{... }
(b) :
LinkStack Pop_LinkStack (LinkStack top, int x)//a stack
{... }
3. Requirements: (1) (a) complete function, function (b) of the algorithm;
(2) write a main () function, and call the above two functions, the output and input 6, complete into the stack, and displayed on the screen
(b) (3) the function to output the stack elements to screen
CodePudding user response:
Fail to find demon elder brother is notCodePudding user response: