C
c
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
28
/*
by Amz
*/
#include <stdio.h>
#include <stdlib.h>
#define MAX 256
int stack[MAX] = {0};
int count = 0;
static inline void push(int x){
if(count == MAX){
fprintf(stderr,"overflow\n");
exit(1);
}
stack[count++] = x;
}
static inline int pop(){
if(count == 0){
fprintf(stderr,"underflow\n");
exit(1);
}
return stack[--count];
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run