Skip to content

Instantly share code, notes, and snippets.

@Bipul1895
Bipul1895 / Stack_ArrayImplementation.C
Created June 29, 2018 09:40 — forked from mycodeschool/Stack_ArrayImplementation.C
This is a basic array based implementation of stack data structure in C.
// Stack - Array based implementation.
// Creating a stack of integers.
#include<stdio.h>
#define MAX_SIZE 101
int A[MAX_SIZE]; // integer array to store the stack
int top = -1; // variable to mark top of stack in array
// Push operation to insert an element on top of stack.