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
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#define cap 10000
struct stack{
int data;
struct stack* next;
}*top;
int size = 0;
void push(struct stack **top,char value){
struct stack* newnode;
newnode = (struct stack*)malloc(sizeof(struct stack));
newnode->data = value;
newnode->next = *top;
*top = newnode;
}
int pop(struct stack** n){
if((*n) == NULL){
printf("List is empty");
return -1;
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run