Write a program to push an element in to a stack
Answers
Answered by
1
Answer:
#include<stdio.h>
void push(char element, char stack[], int *top, int stackSize){
if(*top == -1){
stack[stackSize - 1] = element;
*top = stackSize - 1;
}
else if(*top == 0){
printf("The stack is already full. \ n");
Explanation:
Hope it will helps you
Similar questions
English,
18 days ago
Physics,
18 days ago
Math,
18 days ago
Social Sciences,
1 month ago
English,
1 month ago
Biology,
9 months ago
India Languages,
9 months ago