Language: C

#include<stdio.h>
#define MAX 1000

int top;
int S[MAX];

void initialize(){
       top=0;
       }

void isempty(){
       if(top==0)return;
       }

void isfull(){
       return top>MAX-1;
       }

void pop(int n){
       isfull()return;

       top++;
       S[top]=n;
       }

int push(){
       isempty()return;

       top--;
       return S[top+1];
       }

int main(){
       int i,j,x,y,z;
       char op;
       for(i=0;i != EOF ;i++){
                   scanf("%c",&op);
                   if(op=='+'){
                               x=pop();
                               y=pop();
                               z=x+y;
                               push(z);
                               }
                   else if(op=='-'){
                               x=pop();
                               y=pop();
                               z=x-y;
                               push(z);
                               }
                   else if(op=='*'){
                               x=pop();
                               y=pop();
                               z=x*y;
                               push(z);
                               }
                   else {push(atoi(op));}
                   }
          printf("%d\n",pop());
          return 0;
          }




Compiler output:
main.c: In function 'isfull':
main.c:16:18: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   16 |        return top>MAX-1;
      |               ~~~^~~~~~
main.c:15:6: note: declared here
   15 | void isfull(){
      |      ^~~~~~
main.c: In function 'pop':
main.c:20:16: error: expected ';' before 'return'
   20 |        isfull()return;
      |                ^~~~~~
      |                ;
main.c: In function 'push':
main.c:27:17: error: expected ';' before 'return'
   27 |        isempty()return;
      |                 ^~~~~~
      |                 ;
main.c: In function 'main':
main.c:39:34: error: too few arguments to function 'pop'
   39 |                                x=pop();
      |                                  ^~~
main.c:19:6: note: declared here
   19 | void pop(int n){
      |      ^~~
main.c:40:34: error: too few arguments to function 'pop'
   40 |                                y=pop();
      |                                  ^~~
main.c:19:6: note: declared here
   19 | void pop(int n){
      |      ^~~
main.c:45:34: error: too few arguments to function 'pop'
   45 |                                x=pop();
      |                                  ^~~
main.c:19:6: note: declared here
   19 | void pop(int n){
      |      ^~~
main.c:46:34: error: too few arguments to function 'pop'
   46 |                                y=pop();
      |                                  ^~~
main.c:19:6: note: declared here
   19 | void pop(int n){
      |      ^~~
main.c:51:34: error: too few arguments to function 'pop'
   51 |                                x=pop();
      |                                  ^~~
main.c:19:6: note: declared here
   19 | void pop(int n){
      |      ^~~
main.c:52:34: error: too few arguments to function 'pop'
   52 |                                y=pop();
      |                                  ^~~
main.c:19:6: note: declared here
   19 | void pop(int n){
      |      ^~~
main.c:56:31: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
   56 |                    else {push(atoi(op));}
      |                               ^~~~
main.c:58:25: error: too few arguments to function 'pop'
   58 |           printf("%d\n",pop());
      |                         ^~~
main.c:19:6: note: declared here
   19 | void pop(int n){
      |      ^~~