Computer Science, asked by gamersteem7, 6 days ago

Write a program to push an element in to a stack​

Answers

Answered by janamalaramesh779
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