Untitled
unknown
plain_text
2 years ago
381 B
7
Indexable
#include <stdio.h>
int arr[10];
int top = -1;
void push(int a);
int pop();
int peek();
bool isEmpty();
bool isFull();
main(){
}
void push(int a){
top++;
arr[top] = a;
}
int pop(){
//int item = arr[top];
//top--;
//return item;
return arr[top--];
}
int peek(){
return arr[top];
}
bool isEmpty();
bool isFull();
Editor is loading...
Leave a Comment