We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff4aadb commit bbffdf7Copy full SHA for bbffdf7
misc/postfix_evaluation.c
@@ -18,7 +18,7 @@
18
* @brief array implementation of stack using structure
19
*/
20
struct Stack {
21
- int stack[10]; ///< array stack
+ int stack[20]; ///< array stack
22
int top; ///< stores index of the top element
23
};
24
struct Stack st; ///< global declaration of stack st
@@ -29,7 +29,7 @@ struct Stack st; ///< global declaration of stack st
29
* @returns void
30
31
void push(int8_t opd) {
32
- if(st.top == 9) { // overflow condition
+ if(st.top == 19) { // overflow condition
33
printf("Stack overflow...");
34
exit(1);
35
}
0 commit comments