Implementation of stack using array
#include <stdio.h> int val, top=-1, n, i, j, t, choice=0, stack[100]; void push(); void pop(); void show(); int main() { printf("\nEnter the capacity of the stack\n"); scanf("%d", &n); while(choice != 4) { printf("\nEnter your choice\n1.Push\n2.Pop\n3.Show\n4.Exit\nYou choose: "); scanf("%d",&choice); switch(choice) { case 1: { push(); t += 1; break; } case 2: { pop(); break; } case 3: { show(); break; } case 4: { printf("\nExited\n"); break; } default: { printf("\nInvalid choice.\nEnter a valid choice.\n"); } } } re