System. Collections. Generic | My Assignment Tutor
Program in C# to demonstrate the different operations on Stack usingfixed array.using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Stack{class Stack{private int[] ele;private int top;private int max;public Stack(int size){ele = new int[size];//Maximum size of Stacktop = -1;max = size;}public void push(int item){if (top == max – 1){Console.WriteLine(“Stack Overflow”);return;}else{ele[++top] = item;}}public int pop(){if (top == -1){Console.WriteLine(“Stack is Empty”);return … Read more