C program to implement stack | Push Pop Operation on Stack Using Functions
Copy the Code /* c program to implement stack with struct and functions. * * BY :- KHUSHIT SHAH, khushitshah1@gmail.com * */ #include<stdio.h> #include<conio.h> // not necessary. #include<process.h> #define MAX 10 struct Stack{ int top; int data[MAX]; }stack; void push(){ if(stack.top == MAX-1){ printf("Stack Overflow \n"); return; } else{ int item; printf("Enter the value of data item : "); scanf("%d",&item); stack.data[++stack.top] = item; printf("%d is added at place %d \n",stack.data[stack.top],stack.top); ...