-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstack.h
More file actions
27 lines (23 loc) · 721 Bytes
/
stack.h
File metadata and controls
27 lines (23 loc) · 721 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
* This file contains the definition of the interface for the stack you'll
* implement. You can find descriptions of the stack functions, including
* their parameters and their return values, in stack.c. You should not
* modify anything in this file.
*/
#ifndef __STACK_H
#define __STACK_H
/*
* Structure used to represent a stack.
*/
struct stack;
/*
* Stack interface function prototypes. Refer to stack.c for documentation
* about each of these functions.
*/
struct stack* stack_create();
void stack_free(struct stack* stack);
int stack_isempty(struct stack* stack);
void stack_push(struct stack* stack, void* val);
void* stack_top(struct stack* stack);
void* stack_pop(struct stack* stack);
#endif