Skip to content

Instantly share code, notes, and snippets.

View sgrpwr's full-sized avatar

Sagar Pawar sgrpwr

View GitHub Profile
@sgrpwr
sgrpwr / Stack_ArrayImplementation.C
Created October 6, 2017 18:09 — 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.