criyle/codenet-compile-errors huggingface dataset:
Language: C

#include <stdio.h>
#include <stdlib.h>

#define MAX 100

int isempty(void);
int isfull(void);
void push(int);
int pop(void);

int top = 0;
int stack[MAX];

int main()
{
  int a, b;
  char s[MAX];
  initialize();
  while(scanf("%s", s) != EOF) {
    if(s[0] == '+') {
      push(pop()+pop());
    }
    else if(s[0] == '-') {
      a = pop();
      b = pop();
      push(b-a);
    }
    else if(s[0] == '*') {
      push(pop()*pop());
    }
    else {
      push(atoi(s));
    }
  }
  printf("%d\n", pop());
  return 0;
}
  
int isempty()
{
  if(top == 0)
    return 1;
  else
    return 0;
}
  
int isfull()
{
  if(top >= MAX-1)
    return 1;
  else
    return 0;
}

void push(int x)
{
  if(isfull()) {
    fprintf(stderr, "エラー（オーバーフロー）\n");
    exit(1);
  }
  stack[++top] = x;
}

int pop()
{
  if(isempty()) {
    fprintf(stderr, "エラー（アンダーフロー）\n");
    exit(2);
  }
  top--;
  return stack[top+1];
}

Compiler output:
main.c: In function 'main':
main.c:18:3: error: implicit declaration of function 'initialize' [-Wimplicit-function-declaration]
   18 |   initialize();
      |   ^~~~~~~~~~
Language: C

#include <stdio.h>
#include <stdlib.h>

#define MAX 100

int isempty(void);
int isfull(void);
int push(int);
int pop(void);

int top = 0;
int stack[MAX];

int main()
{
  int x, a, b;
  char s[100];
  while(scanf("%s", s) != EOF) {
    if(s[0] == '+') {
      push(pop()+pop());
    }
    else if(s[0] == '-') {
      a = pop();
      b = pop();
      push(b-a);
    }
    else if(s[0] == '*') {
      push(pop()*pop());
    }
    else {
      x = atoi(s);
      push(x);
    }
  }
  printf("%d\n", pop());
  return 0;
}
  
int isempty(void)
{
  if(top == 0)
    return 1;
  else
    return 0;
}
  
int isfull(void)
{
  if(top >= MAX-1)
    return 1;
  else
    return 0;
}

void push(int x)
{
  if(isfull()) {
    fprintf(stderr, "エラー（オーバーフロー）\n");
    exit(1);
  }
  top++;
  stack[top] = x;
}

int pop(void)
{
  if(isempty()) {
    fprintf(stderr, "エラー（アンダーフロー）\n");
    exit(2);
  }
  top--;
  return stack[top+1];
}

Compiler output:
main.c:55:6: error: conflicting types for 'push'; have 'void(int)'
   55 | void push(int x)
      |      ^~~~
main.c:8:5: note: previous declaration of 'push' with type 'int(int)'
    8 | int push(int);
      |     ^~~~
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define MAX 100
int push(int x);
int pop();
int isEmpty();
int isFULL();
int Stack[MAX]; 
int top;

int main(){
  int x,a,b;
  char s[100];
  initialize();

  while( scanf("%s", s) != EOF ){
    if ( s[0] == '+' ){
      push(pop() + pop());

    } 
    else if ( s[0] == '-' ){
      b = pop();
      push(pop()-b);

    } 
    else if ( s[0] == '*' ){

      push(pop() * pop());

    }
    else {
      x = atoi(s);
      push(x);
    }
  }
  printf("%d\n",Stack[top]);

  return 0;
}

int initialize()
{
  top = 0;
}

int pop()
{
  if(isEmpty==0)
    exit(1);
  }
  top--;
  return Stack[top+1];
}

int push(int x)
{
  if(isFULL==0){
    exit(1);
  }
  top++;
  Stack[top]=x;
}

int isEmpty()
{
  if(top==0)return 0;
  else return 1;
}

int isFULL()
{
  if(top >= MAX - 1)return 0;
  else return 1;
}

Compiler output:
main.c: In function 'main':
main.c:15:3: error: implicit declaration of function 'initialize' [-Wimplicit-function-declaration]
   15 |   initialize();
      |   ^~~~~~~~~~
main.c: At top level:
main.c:52:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before '--' token
   52 |   top--;
      |      ^~
main.c:53:3: error: expected identifier or '(' before 'return'
   53 |   return Stack[top+1];
      |   ^~~~~~
main.c:54:1: error: expected identifier or '(' before '}' token
   54 | }
      | ^
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>


#define MAX 1000
void push(int);
int pop(void);

int Stack[MAX];
int top=0;

int main(){
  
  int a,b;
  top = 0;
  char stack[100];
  
  while(scanf("%s",stack)!=EOF){
    if(stack[0]=='+'){
      a = pop();
      b = pop();
      push(a+b);
    }
    else if(stack[0]=='-'){
      b = pop();
      a = pop();
      push(a-b);
    }
    else if(stack[0]=='*'){
      a = pop();
      b = pop();
      push(a*b);
    }
    else{
      push(atoi(stack));
    }
  }
  
  printf("%d\n",pop());

  return 0;
}

void push(int x){
  Stack[++top] = x;
}


int pop(){
  top--;
  return Stack[top+1];

Compiler output:
main.c: In function 'pop':
main.c:52:3: error: expected declaration or statement at end of input
   52 |   return Stack[top+1];
      |   ^~~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define MAX 100
int push(int x);
int pop();
int isEmpty();
int isFULL();
int Stack[MAX]; 
int top=0;

int main(){
  int x,a,b;
  char s[100];
  initialize();

  while( scanf("%s", s) != EOF ){
    if ( s[0] == '+' ){
      push(pop() + pop());

    } 
    else if ( s[0] == '-' ){
      b = pop();
      push(pop()-b);

    } 
    else if ( s[0] == '*' ){

      push(pop() * pop());

    }
    else {
      x = atoi(s);
      push(x);
    }
  }
  printf("%d\n",Stack[top]);

  return 0;
}


int pop()
{
  if(isEmpty==0){
    exit(1);
  }
  top--;
  return Stack[top+1];
}

int push(int x)
{
  if(isFULL==0){

    exit(1);
  }
  top++;
  Stack[top]=x;
}

int isEmpty()
{
  if(top==0)return 0;
  else return 1;
}

int isFULL()
{
  if(top >= MAX - 1)return 0;
  else return 1;
}

Compiler output:
main.c: In function 'main':
main.c:15:3: error: implicit declaration of function 'initialize' [-Wimplicit-function-declaration]
   15 |   initialize();
      |   ^~~~~~~~~~
Language: C

#include <stdio.h>
#include <stdlib.h>

#define MAX 100

//prototype
void push(int);
int pop();
void isEmpty();
void isFull();

//global variables
int S[MAX + 1]; //opeland
int top=1;

void push(int x){
  //overflow
  isFull(); //full??????exit()

  S[top] = x;

//  printf("push: %d\n",x);

  top++;
}

int pop(){
  int x;
  
  //underflow
  isEmpty(); //empty??????exit()

  top--; //?????????top?????????????????¨

  x = S[top];
//  printf("pop: %d\n",x); //@@

  return x;
}

void isEmpty(){
  if(top==0){
    printf("Error: Underflow\n");
    exit(1);
  }
}

void isFull(){
  if(top>MAX-1){
    printf("Error: Overflow\n");
    exit(1);
  }
}


//MAIN
int main(){
  int n, x_int;
  char x[1000000]

  //sentinel
  S[0] = 0;

  //???????????\???(push) & ???????????????????¨????
  while(scanf("%s", x)!=EOF){
    if(x[0]>47){ //??°?????????(????????????????????§???47????????§???????????°??°?????¨????????§??????)
      x_int = atoi(x); //???????????????int????????????
      push(x_int);
    }else if(x[0]=='+'){ //?¶???????
      push(pop() + pop());
    }else if(x[0]=='-'){ //?????????
      int p1 = pop();
      int p2 = pop();
      push(p2 - p1);
    }else if(x[0]=='*'){ //?????????
      push(pop() * pop());
    }else{
      printf("???????????????????????????????????\??????????????????.\n");
      exit(1);
    }
  }
  
  printf("%d\n", pop());

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:62:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'S'
   62 |   S[0] = 0;
      |   ^
main.c:65:21: error: 'x' undeclared (first use in this function)
   65 |   while(scanf("%s", x)!=EOF){
      |                     ^
main.c:65:21: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int top=0,S[100];


void push(int);
int pop(void);
int isempty(void);
int isfull(void);


int main(){

  int a,b,x;
  char s[100];

  while(scanf("%s",s)!=EOF){


    if(s[0]=='+'){
      a=pop();
      b=pop();
      push(a+b);
    }
    else if(s[0]=='-'){
      a=pop();
      b=pop();
      push(b-a);
    }
    else if(s[0]=='*'){
      a=pop();
      b=pop();
      push(a*b);
    }
    else{
      x=atoi(s);
      push(x);
    }
  }
  printf("%d\n",S[top]);
  return 0;
}

Compiler output:
/usr/bin/ld: /tmp/cciXAPmt.o: in function `main':
main.c:(.text+0x16): undefined reference to `pop'
/usr/bin/ld: main.c:(.text+0x1e): undefined reference to `pop'
/usr/bin/ld: main.c:(.text+0x30): undefined reference to `push'
/usr/bin/ld: main.c:(.text+0x3f): undefined reference to `pop'
/usr/bin/ld: main.c:(.text+0x47): undefined reference to `pop'
/usr/bin/ld: main.c:(.text+0x57): undefined reference to `push'
/usr/bin/ld: main.c:(.text+0x66): undefined reference to `pop'
/usr/bin/ld: main.c:(.text+0x6e): undefined reference to `pop'
/usr/bin/ld: main.c:(.text+0x7f): undefined reference to `push'
/usr/bin/ld: main.c:(.text+0x9a): undefined reference to `push'
collect2: error: ld returned 1 exit status
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int main(){
  int x;
  char s[100];

  while( scanf("%s", s) != EOF ){
    if ( s[0] == '+' ){

    } else if ( s[0] == '-' ){

    } else if ( s[0] == '*' ){

    } else {
      x = atoi(s);

    }
  }


  initialize()
    top=0;
  
  isEmpty()
    return  top==0;
  
  
  isFull()
    return top >= MAX - 1;
  

  push(x)
    if isFull()









  return 0;

Compiler output:
main.c: In function 'main':
main.c:23:3: error: implicit declaration of function 'initialize' [-Wimplicit-function-declaration]
   23 |   initialize()
      |   ^~~~~~~~~~
main.c:23:15: error: expected ';' before 'top'
   23 |   initialize()
      |               ^
      |               ;
   24 |     top=0;
      |     ~~~        
main.c:26:3: error: implicit declaration of function 'isEmpty' [-Wimplicit-function-declaration]
   26 |   isEmpty()
      |   ^~~~~~~
main.c:26:12: error: expected ';' before 'return'
   26 |   isEmpty()
      |            ^
      |            ;
   27 |     return  top==0;
      |     ~~~~~~  
main.c:30:3: error: implicit declaration of function 'isFull' [-Wimplicit-function-declaration]
   30 |   isFull()
      |   ^~~~~~
main.c:30:11: error: expected ';' before 'return'
   30 |   isFull()
      |           ^
      |           ;
   31 |     return top >= MAX - 1;
      |     ~~~~~~ 
main.c:34:3: error: implicit declaration of function 'push' [-Wimplicit-function-declaration]
   34 |   push(x)
      |   ^~~~
main.c:34:10: error: expected ';' before 'if'
   34 |   push(x)
      |          ^
      |          ;
   35 |     if isFull()
      |     ~~    
main.c:45:3: error: expected declaration or statement at end of input
   45 |   return 0;
      |   ^~~~~~
Language: C

#include<stdio.h>

int top=0;
itn push(int);
int pop(void);

int main(){

  int x,y,z;
  char d[100];

  while(scanf("%d",d)!=EOF){

    if(d[0]=='+'){
      x=pop();
      y=pop();
      push(x+y);
    }

    else if(d[0]=='-'){
      x=pop();
      y=pop();
      push(x-y);
    }

    else if(d[0]=='*'){
      x=pop();
      y=pop();
      push(x-y);
    }

    else{
      z=atoi(d);
      push(z);
    }

  }

    printf("%d\n",pop());
    return 0;
}

int d[100];

int push(int n){
  data[top++]=n;
  return n;
}

int pop(void){
  return data[--top];
}

Compiler output:
main.c:4:1: error: unknown type name 'itn'; did you mean 'int'?
    4 | itn push(int);
      | ^~~
      | int
main.c: In function 'main':
main.c:33:9: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
   33 |       z=atoi(d);
      |         ^~~~
main.c: In function 'push':
main.c:46:3: error: 'data' undeclared (first use in this function)
   46 |   data[top++]=n;
      |   ^~~~
main.c:46:3: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'pop':
main.c:51:10: error: 'data' undeclared (first use in this function)
   51 |   return data[--top];
      |          ^~~~
Language: C

#include <stdio.h>
int a[500],head=0;
int main(){
????int b,num=0;
????char c;
??????
????while( (scanf("%c",&c))!=EOF){ 
????????if(num==0&&c=='0'){ a[head]=num;
????????????head++;}
??
????????????if(a<='9'&&c>='0'){num=c-'0'+num*10;}?????????? 
????????????else if(num!=0){?? 
????????a[head]=num;
????????head++;
????????num=0;
????????????}
????????????else {num=0;
????????if(c=='+'){
????????????a[head-2]+=a[head-1];
????????????head--;
????????}
????????else if(c=='*'){
????????????a[head-2]*=a[head-1];
????????????head--;
????????}
??
????????else if(c=='-'){
????????????a[head-2]-=a[head-1];
????????????head--;
????????}
????????????}?? 
????}
??????????
printf("%d\n",a[head-1]);?? 
??
????return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:1: error: expected expression before '?' token
    4 | ????int b,num=0;
      | ^
main.c:5:1: error: expected expression before '?' token
    5 | ????char c;
      | ^
main.c:6:1: error: expected expression before '?' token
    6 | ??????
      | ^
main.c:34:26: error: expected expression before '?' token
   34 | printf("%d\n",a[head-1]);??
      |                          ^
Language: C

#include<stdio.h>
#define STACK_SIZE 100
#define TRUE 1
#define FALSE 0

int stack[STACK_SIZE];
int *top=&stack[1];

void isEmpty(int stack){
  if(stack.top==0){
    return TRUE;
      }else{
    return FALSE;
      }
}

int push(int stack,int x){
  stack.top=stack.top+1;
  stack[stack.top]=x;
}

int pop(int stack){
  if(isEmpty(stack)==FALSE){
    printf("ellor underflow\n");
  }else{
    stack.top = stack.top-1;
    return stack[stack.top+1];
  }
}

int main(){
  printf("test\n");
  return 0;
}

Compiler output:
main.c: In function 'isEmpty':
main.c:10:11: error: request for member 'top' in something not a structure or union
   10 |   if(stack.top==0){
      |           ^
main.c:3:14: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    3 | #define TRUE 1
      |              ^
main.c:11:12: note: in expansion of macro 'TRUE'
   11 |     return TRUE;
      |            ^~~~
main.c:9:6: note: declared here
    9 | void isEmpty(int stack){
      |      ^~~~~~~
main.c:4:15: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    4 | #define FALSE 0
      |               ^
main.c:13:12: note: in expansion of macro 'FALSE'
   13 |     return FALSE;
      |            ^~~~~
main.c:9:6: note: declared here
    9 | void isEmpty(int stack){
      |      ^~~~~~~
main.c: In function 'push':
main.c:18:8: error: request for member 'top' in something not a structure or union
   18 |   stack.top=stack.top+1;
      |        ^
main.c:18:18: error: request for member 'top' in something not a structure or union
   18 |   stack.top=stack.top+1;
      |                  ^
main.c:19:14: error: request for member 'top' in something not a structure or union
   19 |   stack[stack.top]=x;
      |              ^
main.c: In function 'pop':
main.c:23:6: error: void value not ignored as it ought to be
   23 |   if(isEmpty(stack)==FALSE){
      |      ^~~~~~~~~~~~~~
main.c:26:10: error: request for member 'top' in something not a structure or union
   26 |     stack.top = stack.top-1;
      |          ^
main.c:26:22: error: request for member 'top' in something not a structure or union
   26 |     stack.top = stack.top-1;
      |                      ^
main.c:27:23: error: request for member 'top' in something not a structure or union
   27 |     return stack[stack.top+1];
      |                       ^
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

void push(int* , int);
int isempty(void);
int pop(int*);

int top=0;

int main(){
  
  int i,time=0,y,x,in;
  int num[100];
  char s[100];

  while(scanf("%s",s)!==EOF){

    if(s[0]=='+'){
      y=pop(num);
      x=pop(num);
      in=x+y;
      push(num,in);
    }
    else if(s[0]=='-'){
      y=pop(num);
      x=pop(num);
      in=x-y;
      push(num,in);
    }
    else if(s[0]=='*'){
      y=pop(num);
      x=pop(num);
      in=x*y;
      push(num,in);
    }
    else{
      in=atoi(s);
      push(num,in);

    }
  }
  printf("%d\n",num[1]);


    
  return 0;
}


void push(int* A, int x){

  top++;
  A[top]=x;
}


int pop(int* A){

  if(isempty()){
    printf("error underflow\n");
    exit(1);
  }
  else{
    top=top-1;
    return A[top+1];
  }
}

int isempty(void){

  if(top==0) return 1;
  else return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:24: error: expected expression before '=' token
   17 |   while(scanf("%s",s)!==EOF){
      |                        ^
Language: C

#include <stdio.h>
#include <stdlib.h>

void push(int,int *);
int pop(int *);
int isFull(void);

int top=0;

int main(){
  
  int x,data[2];
  int a[100];
  char s[100];

  while(scanf("%s",s)!=EOF){
    if(s[0]=='+'|| s[0]=='-'||s[0]=='*'){
       data[0]=pop(a);
       data[1]=pop(a);
    }

      if(s[0]=='+'){
	push(data[1]+data[0],a);

     }else if(s[0]=='-'){
	push(data[1]-data[0],a);
  
     }else if(s[0]=='*'){
	push(data[1]*data[0],a);

     }else {
	 x = atoi(s);
         push(x,a);
     }
    } 
   printf("\n%d\n",a[1]);
  return 0;
}


int isFull(void){
  if(top>=99)return 0;
  else return 1;
 }

void push(int x,int *a){
  if (isFull()==0) fprintf(stderr,"オーバーフロー\n");
  top++;
  a[top]=x;
  }
}

int pop(int *a){
  if (isFull()==0) fprintf(stderr,"オーバーフロー\n");
  top--;
  return a[top+1];
}
 

Compiler output:
main.c:51:1: error: expected identifier or '(' before '}' token
   51 | }
      | ^
Language: C

#include <stdlib.h>
#include <string.h>

int pop();
void push(int);

int s[100],top = 0;

int main() {
  int x, y, z;
  char str[100];
  
  while(scanf("%s",str) != EOF) {
    if ( str[0] == '+' ){
      x = pop();
      y = pop();
      push(x + y);
    } else if ( str[0] == '-' ){
      x = pop();
      y = pop();
      push(y - x);
    } else if ( str[0] == '*' ){
      x = pop();
      y = pop();
      push(x * y);
    } else {
      z = atoi(str);
      push(z);
    }
  }
  printf("%d\n",pop());

  return 0;
}

int pop() {
  return s[--top];
}

void push(int n) {
  s[top++] = n;
}

Compiler output:
main.c: In function 'main':
main.c:13:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   13 |   while(scanf("%s",str) != EOF) {
      |         ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    2 | #include <string.h>
  +++ |+#include <stdio.h>
    3 | 
main.c:13:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   13 |   while(scanf("%s",str) != EOF) {
      |         ^~~~~
main.c:13:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:13:28: error: 'EOF' undeclared (first use in this function)
   13 |   while(scanf("%s",str) != EOF) {
      |                            ^~~
main.c:13:28: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:13:28: note: each undeclared identifier is reported only once for each function it appears in
main.c:31:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   31 |   printf("%d\n",pop());
      |   ^~~~~~
main.c:31:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:31:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:31:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <stdio.h>
#include <stdlib.h>
#define N 100
int push(int);
int pop(void);
int isempty(void);

static int stack[N+1],p;

main()
{
int a,b,i,x;
char c[N];



printf("逆ポーランド法で入力してください（例）12+: ");
scanf("%s",c);


for(i=0;c[i]!='\0';i++){
if(c[i]<='9'&&c[i]>='0')
x=atoi(c[i]);
push(x);

else
switch(c[i]){
case '+':
a=pop();
b=pop();
push(b+a);
break;

case '-':
a=pop();
b=pop();
push(b-a);
break;

case '*':
a=pop();
b=pop();
push(a*b);
break;

case '/':
a=pop();
b=pop();
push(b/a);
break;

if(a==0)
break;
}

}
printf("答え: %d",c[0]);
return 0;
}

int push(int x){
stack[p++]=x;
}

int pop(void){
return stack[--p];
} 

Compiler output:
main.c:10:1: error: return type defaults to 'int' [-Wimplicit-int]
   10 | main()
      | ^~~~
main.c: In function 'main':
main.c:23:9: error: passing argument 1 of 'atoi' makes pointer from integer without a cast [-Wint-conversion]
   23 | x=atoi(c[i]);
      |        ~^~~
      |         |
      |         char
In file included from main.c:2:
/usr/include/stdlib.h:105:30: note: expected 'const char *' but argument is of type 'char'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
main.c:26:1: error: 'else' without a previous 'if'
   26 | else
      | ^~~~
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int main(){
  int i=1,j=1,x[100],ans=0,y[100];
  char s[100];

  while( scanf("%s", s) != EOF ){
    if ( s[0] == '+' ){
      if(i==1)ans=y[i-1]+y[i];
      else {
        y[j]=x[i-1]+x[i];
        i=1;
        j++;
      }
    } 
    else if ( s[0] == '-' ){
      if(i==1)ans=y[i-1]-y[i];
      else {
        y[j]=x[i-1]-x[i];
        i=1;
        j++;
      }
    } 
    else if ( s[0] == '*' ){
      if(i==1)ans=y[i-1]*y[i];
      else {
        y[j]=x[i-1]*x[i];
        i=1;
        j++; 
      }
    } 
    else {
      x[i] = atoi(s);
      i++;
    }
  }
  printf("%d\n",ans);

Compiler output:
main.c: In function 'main':
main.c:39:3: error: expected declaration or statement at end of input
   39 |   printf("%d\n",ans);
      |   ^~~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>
#define N 200

int main(void){
  int a, b, ans, i=0;
  char *S[N];

  while(scanf("%s",&S[i]) != EOF){
    i++;

    switch(*S[i]){
    case '+':
      a = atoi(S[i-2]);
      b = atoi(S[i-1]);
      ans = a + b;

      itoa(ans, S[i-2],10);
      i--;

    case '*':

      a = atoi(S[i-2]);
      b = atoi(S[i-1]);
      ans = a * b;
      itoa(ans, S[i-2],10);
      i--;

    case '-':

      a = atoi(S[i-2]);
      b = atoi(S[i-1]);
      ans = a - b;
      itoa(ans, S[i-2],10);
      i--;
    }
  }
  printf("%s\n",S[i]);

}

Compiler output:
main.c: In function 'main':
main.c:18:7: error: implicit declaration of function 'itoa' [-Wimplicit-function-declaration]
   18 |       itoa(ans, S[i-2],10);
      |       ^~~~
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>


int pop(void);
void push(int );
int isEmpty();
int isFull();


int stack[101];
int top=0;

int main(){
  int x;
  int sum=0,sub,sub1,multi=1;
  char s[100];

  while( scanf("%s", s) != EOF ){
    if ( s[0] == '+' ){
      sum+=pop();
      // printf("%d",sum);
      sum+=pop();
      //   printf("%d",sum);
      push(sum);  
      //printf("%d",sum);
      sum=0;
    } else if ( s[0] == '-' ){
      sub1=pop();
      sub=pop();
      sub-=sub1;

      push(sub);
      sub=0;

    } else if ( s[0] == '*' ){
      multi*=pop();
      multi*=pop();


      push(multi);
      multi=1;

    } else {
      x = atoi(s);
      // printf("%d\n",x);
      push(x);
    }
  }
  printf("%d\n",stack[1]);
  return 0;
}

int pop(){
 
  if(isFull()>101)exit(0);
 
  top--;
  return stack[top+1];
}


void push(int c){
   
  if(0>isEmpty())exit(1);
 
  top++;
  stack[top]=c;
 
}

Compiler output:
/usr/bin/ld: /tmp/cc4Bbg7r.o: in function `pop':
main.c:(.text+0x11b): undefined reference to `isFull'
/usr/bin/ld: /tmp/cc4Bbg7r.o: in function `push':
main.c:(.text+0x16d): undefined reference to `isEmpty'
collect2: error: ld returned 1 exit status
Language: C

# define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdbool.h>

# define STACK_MAX 200 /* ???????????????????????§(100) + ?????????????????§(99) + 1 */

void push(value);
int pop();
int main(void);
bool isNum(char c);	
char* getOperand();

static	int st_stack_index = 0;
static	int st_stack[STACK_MAX];
static 	char st_Operand[STACK_MAX];

int main(void) {

	int value = 0;

	char* ope;
	int ope1;
	int ope2;

	while ((ope = getOperand()) != NULL) {

		if (*ope == ' ') {
			continue;
		}

		/* ?????????????????°?????? */
		if (isNum(*ope)) {
			/*printf("%s ", ope);*/
			push(atoi(ope));
		}
		else { /* ??°?????§???????????°????????? */
			ope1 = pop();
			ope2 = pop();
			/*printf("%s ", ope);*/

			switch (*ope) {
			case '+':
			{
				value = ope1 + ope2;
			}
			break;
			case '*':
			{
				value = ope1 * ope2;
			}
			break;
			case '-':
			{
				value = ope2 - ope1;
			}
			break;
			default:
			{
				return -1;
			}
			}
			/* ?¨????????????????????????????????´? */
			push(value);
		}
	}

	printf("%d\n", pop());
#endif

	return 0;
}

bool isNum(char c)
{
	if (isdigit(c) != 0) {
		return true;
	}
	else {
		return false;
	}
}

/* ?¨??????\???????????????????????????????????????????????§?????????????????? */
char* getOperand()
{
#if 0
	static char* question[] = { "1", "2", "+", "3", "4", "-", "*", NULL };
	//char question[] = "10 5 + 3 *";
	static int question_index = 0;

	return question[question_index++];
#else
	
#endif
	if (scanf("%c", st_Operand) != EOF/*EOF??§??????*/) {
		if (*st_Operand != '\n') {
			return st_Operand;
		}
	}
	return NULL;
}

void push(value) {

	st_stack_index++;
	st_stack[st_stack_index] = value;

}

int pop() {

	int p;

	p = st_stack[st_stack_index];

	st_stack_index--;

	return p;
}

Compiler output:
main.c:9:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
    9 | void push(value);
      | ^~~~
main.c: In function 'main':
main.c:70:2: error: #endif without #if
   70 | #endif
      |  ^~~~~
main.c: In function 'push':
main.c:105:6: error: type of 'value' defaults to 'int' [-Wimplicit-int]
  105 | void push(value) {
      |      ^~~~
Language: C

# define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdbool.h>

# define STACK_MAX 200 /* ???????????????????????§(100) + ?????????????????§(99) + 1 */

void push(value);
int pop();
int main(void);
bool isNum(char c);	
char* getOperand();

static	int st_stack_index = 0;
static	int st_stack[STACK_MAX];
static 	char st_Operand[STACK_MAX];

int main(void) {

	int value = 0;

	char* ope;
	int ope1;
	int ope2;

	while ((ope = getOperand()) != NULL) {
		if (*ope == ' ') {
			break;
		}
		
		/* ?????????????????°?????? */
		if (isNum(*ope)) {
			/*printf("%s ", ope);*/
			push(atoi(ope));
		}
		else { /* ??°?????§???????????°????????? */
			ope1 = pop();
			ope2 = pop();
			/*printf("%s ", ope);*/

			switch (*ope) {
			case '+':
			{
				value = ope1 + ope2;
				push(value);
			}
			break;
			case '*':
			{
				value = ope1 * ope2;
				push(value);
			}
			break;
			case '-':
			{
				value = ope2 - ope1;
				push(value);
			}
			break;
			default:
			{
				return -1;
			}
			}
			/* ?¨????????????????????????????????´? */
			/*push(value);*/
		}
	}

	printf("%d\n", pop());

	return 0;
}

bool isNum(char c)
{
	if (isdigit(c) != 0) {
		return true;
	}
	else {
		return false;
	}
}

/* ?¨??????\???????????????????????????????????????????????§?????????????????? */
char* getOperand()
{
#if 0
	static char* question[] = { "1", "2", "+", "3", "4", "-", "*", NULL };
	//static char* question[] = { "10","5", "+", "3", "*" };
	static int question_index = 0;

	return question[question_index++];
#else
	
#endif
	while(scanf("%s", st_Operand) != EOF) {		
		return st_Operand;
	}
	return NULL;
//}

void push(value) {

	st_stack_index++;
	st_stack[st_stack_index] = value;

}

int pop() {

	int p;

	p = st_stack[st_stack_index];

	st_stack_index--;

	return p;
}

Compiler output:
main.c:9:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
    9 | void push(value);
      | ^~~~
main.c: In function 'push':
main.c:104:6: error: type of 'value' defaults to 'int' [-Wimplicit-int]
  104 | void push(value) {
      |      ^~~~
main.c: In function 'getOperand':
main.c:120:1: error: expected declaration or statement at end of input
  120 | }
      | ^
Language: C

# define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdbool.h>

# define STACK_MAX 200 /* ???????????????????????§(100) + ?????????????????§(99) + 1 */

void push(value);
int pop();
int main(void);
bool isNum(char c);	
char* getOperand(char buf[]);

static	int st_stack_index = 0;
static	int st_stack[STACK_MAX];
static 	char st_Operand[STACK_MAX];

int main(void) {

	int value = 0;
	char buf[STACK_MAX];
	char ope[100];
	int ope1;
	int ope2;

	//fgets(buf, STACK_MAX, stdin);

	while (getOperand(char buf[]) != NULL) {
		if (*ope == ' ') {
			break;
		}
		
		/* ?????????????????°?????? */
		if (isNum(*ope)) {
			/*printf("%s ", ope);*/
			push(atoi(ope));
		}
		else { /* ??°?????§???????????°????????? */
			ope1 = pop();
			ope2 = pop();
			/*printf("%s ", ope);*/

			switch (*ope) {
			case '+':
			{
				value = ope1 + ope2;
				push(value);
			}
			break;
			case '*':
			{
				value = ope1 * ope2;
				push(value);
			}
			break;
			case '-':
			{
				value = ope2 - ope1;
				push(value);
			}
			break;
			default:
			{
				return -1;
			}
			}
			/* ?¨????????????????????????????????´? */
			/*push(value);*/
		}
	}

	printf("%d\n", pop());

	return 0;
}

bool isNum(char c)
{
	if (isdigit(c) != 0) {
		return true;
	}
	else {
		return false;
	}
}

/* ?¨??????\???????????????????????????????????????????????§?????????????????? */
char* getOperand(char buf[])
{
#if 0
	static char* question[] = { "1", "2", "+", "3", "4", "-", "*", NULL };
	//static char* question[] = { "10","5", "+", "3", "*" };
	static int question_index = 0;

	return question[question_index++];
#else
	
#endif
	while(scanf(buf, "%s", st_Operand) != EOF) {		
		return st_Operand;
	}
	return NULL;
}

void push(value) {

	st_stack_index++;
	st_stack[st_stack_index] = value;

}

int pop() {

	int p;

	p = st_stack[st_stack_index];

	st_stack_index--;

	return p;
}

Compiler output:
main.c:9:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
    9 | void push(value);
      | ^~~~
main.c: In function 'main':
main.c:29:27: error: expected expression before 'char'
   29 |         while (getOperand(char buf[]) != NULL) {
      |                           ^~~~
main.c: In function 'push':
main.c:106:6: error: type of 'value' defaults to 'int' [-Wimplicit-int]
  106 | void push(value) {
      |      ^~~~
Language: C

#include<stdio.h>
#include <stdlib.h>
#include <string.h>

	int top = -1;
	int push(int);
	int pop(void);
	char in[6];
	int stack[100],n,m;

int main(void){
	
	while(scanf("%s",in) != EOF){
	
	if(in[1] == '+'){
		
		n=pop();
		m=pop();
		push(m+n);
		
		}
		
	else if(in[1] == '-'){
		
		n=pop();
		m=pop();
		push(m-n);
		
		}
	
	else if(in[1] == '*'){
		
		n=pop();
		m=pop();
		push(m*n);
		
		}
	
	else{
		
		push(atoi(in));
		
		}
	
	}
	
	printf("%d\n",pop());
	
return 0;}


int push(int plus){
	
	top++;
	stack[top] = plus;
	
return 0;}


int pop(void){
	
	int num;
	num = stack[top];
	stack[top] = NULL;
	top--;
	

Compiler output:
main.c: In function 'pop':
main.c:64:20: error: assignment to 'int' from 'void *' makes integer from pointer without a cast [-Wint-conversion]
   64 |         stack[top] = NULL;
      |                    ^
main.c:65:9: error: expected declaration or statement at end of input
   65 |         top--;
      |         ^~~
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int top,S[1000];

void  push(int x){
   S[++top] = x;
}

int pop(){
   top--;
   return S[top+1];
}

int main(){
  int a,b;
  top = 0;
  char s[100];
 
  while( scanf("%s",s) != EOF){
    if(s[0] == " + "){
      a = pop();
      b = pop();
      push(a + b);
   }else if(s[0] == "-"){
   	  b = pop();
   	  a = pop();
   	  push(a - b);
   }else if(s[0] == "*"){
   	  a = pop();
   	  b = pop();
   	  push(a * b);
   }else{
   	  push(atoi(s));
   }
   print("%d\n",pop());
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:13: warning: comparison between pointer and integer
   22 |     if(s[0] == " + "){
      |             ^~
main.c:26:18: warning: comparison between pointer and integer
   26 |    }else if(s[0] == "-"){
      |                  ^~
main.c:30:18: warning: comparison between pointer and integer
   30 |    }else if(s[0] == "*"){
      |                  ^~
main.c:37:4: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   37 |    print("%d\n",pop());
      |    ^~~~~
      |    printf
main.c:39:1: error: expected declaration or statement at end of input
   39 | }
      | ^
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int top,S[1000];

void  push(int x){
   S[++top] = x;
}

int pop(){
   top--;
   return S[top+1];
}

int main(){
  int a,b;
  top = 0;
  char s[100];
 
  while( scanf("%s",s) != EOF){
    if(s[0] == " + "){
      a = pop();
      b = pop();
      push(a + b);
   }else if(s[0] == "-"){
   	  b = pop();
   	  a = pop();
   	  push(a - b);
   }else if(s[0] == "*"){
   	  a = pop();
   	  b = pop();
   	  push(a * b);
   }else{
   	  push(atoi(s));
   }
  }
   print("%d\n",pop());
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:13: warning: comparison between pointer and integer
   22 |     if(s[0] == " + "){
      |             ^~
main.c:26:18: warning: comparison between pointer and integer
   26 |    }else if(s[0] == "-"){
      |                  ^~
main.c:30:18: warning: comparison between pointer and integer
   30 |    }else if(s[0] == "*"){
      |                  ^~
main.c:38:4: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   38 |    print("%d\n",pop());
      |    ^~~~~
      |    printf
Language: C

#include<stdio.h>
#include<stdlib.h>
main(){
  char op[1000200];
  int memory[100],cnt=0;
  while(scanf(%s,op)!=EOF){
    if(op=="+"){
      memory[cnt-2]+=memory[cnt-1];
      cnt--;
    }else if(op=="-"){
      memory[cnt-2]-=memory[cnt-1];
      cnt--;
    }else if(op=="*"){
      memory[cnt-2]*=memory[cnt-1];
      cnt--;
    }else{
      memory[cnt]=atoi(op);
      cnt++;
    }
  }
  printf("%d\n",memory[0]);
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:6:15: error: expected expression before '%' token
    6 |   while(scanf(%s,op)!=EOF){
      |               ^
Language: C

#include <stdio.h>
#include <math.h>

#define MAX_ELE 1000000

int stack[102];
int stack_num = 0;

//functions
void calc(int op);


int main(void){

	int i=0;
	char tmp=0,c;
	int tmp_array[8],tmp_num=0;
	int num=0;
	int polish[201];
	//input
	while(tmp != '='){
		scanf("%c",&tmp);
		if(tmp == '=') break;
		if(tmp == ' ') continue;
		if(tmp == '+' || tmp == '*'|| tmp == '-') polish[num++] = tmp;
		else{
			tmp_num = 0;
			tmp_array[tmp_num++] = tmp-'0';
			while((c=getchar()) != ' '){
				tmp_array[tmp_num++] = c-'0';
				for(i=0;i<tmp_num-1;i++){
					tmp_array[i] = tmp_array[i]*10;
				}
			}
			tmp = 0;
			for(i=0;i<tmp_num;i++) tmp += tmp_array[i];
			polish[num++] = tmp;
		}
	}

	//calculate
	for(i=0;i<num;i++){
		if(polish[i] == '+' || polish[i] == '*'|| polish[i] == '-'){
			calc(polish[i]);
		}else{
			stack[stack_num]=polish[i];
			stack_num++;
		}
}
//output
printf("%d",stack[0]);
peintf("\n");
return 0;
}

void calc(op){
	int result;
	if(op == '+'){
		result = stack[stack_num-1] + stack[stack_num-2];
		stack[stack_num-2] = result;
	}else if(op == '*'){
		result = stack[stack_num-1] * stack[stack_num-2];
		stack[stack_num-2] = result;
	}else if(op == '-'){
		result = stack[stack_num-2] - stack[stack_num-1];
		stack[stack_num-2] = result;
	}
	stack[stack_num-1] = '\0';
	stack_num--;
	return;
}

Compiler output:
main.c: In function 'main':
main.c:52:1: error: implicit declaration of function 'peintf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   52 | peintf("\n");
      | ^~~~~~
      | printf
main.c: In function 'calc':
main.c:56:6: error: type of 'op' defaults to 'int' [-Wimplicit-int]
   56 | void calc(op){
      |      ^~~~
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int top,S[1000];

void push(int x){
	S[++top] = x;
	for(i = 1;i <= top; i++){
		printf("S[%d] = %d",i,S[i]);
		if(i != top){
			printf(" ");
		}
		else{
			printf("\n");
		}
	}
}

int pop(){
	top--;
	return S[top+1];
}

int main(){
	int a,b;
	top = 0;
	char s[100];

while(scanf("%s",s) != EOF){
	if(s[0] == '+'){
	a = pop();
	b = pop();
	push(a+b);
	}
	else if(s[0] == '-'){
		b = pop();
		a = pop();
		push(a-b);
	}
	else if(s[0] == '*'){
		a = pop();
			b = pop();
		push(a*b);
	}
	else{
		push(atoi(s));
	}
}
	printf("%d\n",pop());
	return 0;
}

Compiler output:
main.c: In function 'push':
main.c:9:13: error: 'i' undeclared (first use in this function)
    9 |         for(i = 1;i <= top; i++){
      |             ^
main.c:9:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int main(){
 int i=0;
 int num[100];
 char stack[100];

 while( scanf("%s", stack) != EOF ){
  if ( stack[0] == '+' ){
   num[i-2]=num[i-2]+num[i-1];
   i--;
   } else if ( stack[0] == '-' ){
    num[i-2]=num[i-2]-num[i-1];
   i--;
  } else if ( stack[0] == '*' ){
   num[i-2]=num[i-2]*num[i-1];
   i--;
  } else {
   num[i] = atoi(stack);
   i++;
  }

 }
 printf("%d\n",x[0]);

 return 0;

Compiler output:
main.c: In function 'main':
main.c:26:16: error: 'x' undeclared (first use in this function)
   26 |  printf("%d\n",x[0]);
      |                ^
main.c:26:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:28:2: error: expected declaration or statement at end of input
   28 |  return 0;
      |  ^~~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>
 
int top,S[10000];
 
void push(int x){
  S[++top]=x;
}
 
int pop(){
 return S[top--];
}
 
int main(){
  int a,b;
  char s;
  top=0;
   
  while(scanf("%s",s)!=EOF){
    if(s[0]=='+'){
      b=pop();
      a=pop();
      push(a+b);
    }else if(s =='-'){
      b=pop();
      a=pop();
      push(a-b);
    }else if(s =='*'){
      b=pop();
      a=pop();
      push(a*b);
    }else{
      push(atoi(s));
    }
  }
  printf("%d\n",pop());
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:9: error: subscripted value is neither array nor pointer nor vector
   20 |     if(s[0]=='+'){
      |         ^
main.c:33:17: error: passing argument 1 of 'atoi' makes pointer from integer without a cast [-Wint-conversion]
   33 |       push(atoi(s));
      |                 ^
      |                 |
      |                 char
In file included from main.c:2:
/usr/include/stdlib.h:105:30: note: expected 'const char *' but argument is of type 'char'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>

int top, S[100];
 
void push(int x){
	top++
	S[top]=x;
}
 
int pop(){
	top--
	return S[top+1];
}
 
int main(void){
	int a,b;
	char s[100];
	top=0;
   
	while(scanf("%s",s)!=EOF){
		if(s[0]=='+'){
			b=pop();
			a=pop();
			push(a+b);
		}else if(s[0]=='-'){
			b=pop();
			a=pop();
			push(a-b);
		}else if(s[0]=='*'){
			b=pop();
			a=pop();
			push(a*b);
		}else{
			push(atoi(s));
		}
	}
	
	printf("%d\n",pop());
	
	return 0;
}

Compiler output:
main.c: In function 'push':
main.c:7:14: error: expected ';' before 'S'
    7 |         top++
      |              ^
      |              ;
    8 |         S[top]=x;
      |         ~     
main.c: In function 'pop':
main.c:12:14: error: expected ';' before 'return'
   12 |         top--
      |              ^
      |              ;
   13 |         return S[top+1];
      |         ~~~~~~
Language: C

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define mymalloc(p,n) {p = malloc((n)*sizeof(*p));if ((p)==NULL) {printf("not enough memory?\n"); exit(1);};}

typedef struct obj{
	int value;
	struct obj *next;
	struct obj *prev;
}obj;

typedef struct{
	obj *root;
}stack;

obj *createObj(int v,obj *pre,obj *nex){
	obj *ob;
	mymalloc(ob,1);
	ob->value=v;
	ob->prev=pre;
	ob->next=nex;
	return ob;
}

int pop(stack *S){
	int value;
  obj *temp;
	value=S->root->next->value;
	temp=NULL;
	if(S->root->next->next!=NULL){
		temp=S->root->next->next;
	}
	free(S->root->next);
	S->root->next=temp;
	if(S->root->next!=NULL){
		S->root->next->prev=S->root;
	}
	\\printf("pop %d\n",value);
	return value;
}

void push(stack *S,int v){
	obj *ob;
	ob=createObj(v,S->root,S->root->next);
	if(S->root->next!=NULL){
		S->root->next->prev=ob;
	}
	S->root->next=ob;
	\\printf("push %d\n",v);
}

stack *createStack(){
	stack *S;
	mymalloc(S,1);
	S->root=createObj(0,NULL,NULL);
	return S;
}


void calcPoland(stack *S,char *v){
	int i,j,value;
	if(isdigit(v[0])){
		i=atoi(v);
		\\printf("%d\n",i);
		push(S,i);
	}
	else{
		j=pop(S);
		i=pop(S);
		switch(v[0]){
			case '+':
				value=i+j;break;
			case '-':
				value=i-j;break;
			case '*':
				value=i*j;break;
		}
		push(S,value);
	}
}

main(){
	char v[10];
	stack *S;
	S=createStack();
	while(scanf("%s",v)!=EOF){
		calcPoland(S,v);
	}
	printf("%d\n",pop(S));
	free(S);
	return 0;
}

Compiler output:
main.c: In function 'pop':
main.c:38:9: error: stray '\' in program
   38 |         \\printf("pop %d\n",value);
      |         ^
main.c:38:10: error: stray '\' in program
   38 |         \\printf("pop %d\n",value);
      |          ^
main.c: In function 'push':
main.c:49:9: error: stray '\' in program
   49 |         \\printf("push %d\n",v);
      |         ^
main.c:49:10: error: stray '\' in program
   49 |         \\printf("push %d\n",v);
      |          ^
main.c: In function 'calcPoland':
main.c:62:12: error: implicit declaration of function 'isdigit' [-Wimplicit-function-declaration]
   62 |         if(isdigit(v[0])){
      |            ^~~~~~~
main.c:4:1: note: include '<ctype.h>' or provide a declaration of 'isdigit'
    3 | #include<stdlib.h>
  +++ |+#include <ctype.h>
    4 | #define mymalloc(p,n) {p = malloc((n)*sizeof(*p));if ((p)==NULL) {printf("not enough memory?\n"); exit(1);};}
main.c:64:17: error: stray '\' in program
   64 |                 \\printf("%d\n",i);
      |                 ^
main.c:64:18: error: stray '\' in program
   64 |                 \\printf("%d\n",i);
      |                  ^
main.c: At top level:
main.c:82:1: error: return type defaults to 'int' [-Wimplicit-int]
   82 | main(){
      | ^~~~
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int top = 0, S[1000];

void push(int x) {
	S[++top] = x;
}

int pop() {
	top--;
	return S[top + 1];
}

int main() {
	int a, b;
	char s[100];
	while (scanf_s("%s", &s) != EOF) {
		if (s[0] == '+') {
			a = pop();
			b = pop();
			push(a + b);
		}
		else if (s[0] == '-') {
			a = pop();
			b = pop();
			push(a - b);
		}
		else if (s[0] == '*') {
			a = pop();
			b = pop();
			push(a * b);
		}
		else {
			push(atoi(s));
		}

		printf("%d\n", pop());

		return 0;
	}
}

Compiler output:
main.c: In function 'main':
main.c:19:16: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   19 |         while (scanf_s("%s", &s) != EOF) {
      |                ^~~~~~~
      |                scanf
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int top;S[1000];

void push(int x){
  S[++top]=x;
}

void pop(){
 return S[top];
 top--;
}

int main(void){
  int a,b;
  top=0;
  char s[100];

  while(scanf("%s",s)!=EOF){
    if(S[0]=='+'){
      a=pop();
      b=pop();
      push(a+b);
    }
    else if(S[0]=='-'){
      a=pop();
      b=pop();
      push(a-b);
    }

    else if(S[0]=='*'){
      a=pop();
      b=pop();
      push(a*b);
    }
    else{
      push(atoi(s));
    }
  }

  printf("%d\n",pop());
  return 0;
}

Compiler output:
main.c:5:9: warning: data definition has no type or storage class
    5 | int top;S[1000];
      |         ^
main.c:5:9: error: type defaults to 'int' in declaration of 'S' [-Wimplicit-int]
main.c: In function 'pop':
main.c:12:10: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   12 |  return S[top];
      |         ~^~~~~
main.c:11:6: note: declared here
   11 | void pop(){
      |      ^~~
main.c: In function 'main':
main.c:23:8: error: void value not ignored as it ought to be
   23 |       a=pop();
      |        ^
main.c:24:8: error: void value not ignored as it ought to be
   24 |       b=pop();
      |        ^
main.c:28:8: error: void value not ignored as it ought to be
   28 |       a=pop();
      |        ^
main.c:29:8: error: void value not ignored as it ought to be
   29 |       b=pop();
      |        ^
main.c:34:8: error: void value not ignored as it ought to be
   34 |       a=pop();
      |        ^
main.c:35:8: error: void value not ignored as it ought to be
   35 |       b=pop();
      |        ^
main.c:43:17: error: invalid use of void expression
   43 |   printf("%d\n",pop());
      |                 ^~~~~
Language: C

#include<iostream>
#include<istream>
#include<string>
using namespace std;
int top, S[200];//?????¶??????top?????¨??\?????¨??°???????????´??´?????°???S
void push(int x)
{
	 top++;
	//cout<<"top:"<<top<<endl;
	S[top] = x; //??\?????¶?????????????????°???
}
int pop()
{
	int x= S[top];//cout<<"top:"<<top<<endl;
	top--;//????????¶??????????????°?????????????????????
	return x;
}
int main()
{
	int a, b;
	top = 0;//?????????
	int i = 0;
	char s[100];
	//cout << "---";
	while (scanf("%s",s)!=EOF)
	{
               // cout<<s<<endl;
		if (s[0] == '+')
		{
			a = pop();
			//cout<<"a="<<a<<endl;
			b = pop();
			//cout<<"b="<<b<<endl;
			push(a + b);
			//cout<<"push"<<a+b<<endl;
		}
		else if (s[0] == '-')
		{
			b = pop();
			//cout<<"b="<<b<<endl;
			a = pop();
			//cout<<"a="<<a<<endl;
			push(a - b);
			//cout<<"push"<<a-b<<endl;
		}
		else if (s[0] == '*')
		{
			a = pop();
			//cout<<"a="<<a<<endl;
			b = pop();
			//cout<<"b="<<b<<endl;
			push(a*b);
			//cout<<"push"<<a*b<<endl;
		}
		else
		{
			push(atoi(s));
			//cout<<atoi(s)<<"push"<<endl;
		}
		i++;
	}
	printf("%d\n", pop());
	return 0;

}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
using namespace std;
int top, S[200];//?????¶??????top?????¨??\?????¨??°???????????´??´?????°???S
void push(int x)
{
	 top++;
	S[top] = x; //??\?????¶?????????????????°???
}
int pop()
{ 
	int x= S[top];
	top--;//????????¶??????????????°?????????????????????
	return x;
}
int main()
{
	int a, b;
	top = 0;//?????????
	int i = 0;
	char s[100];
	//cout << "---";
	while (scanf("%s",s)!=EOF)
	{

		if (s[0] == '+')
		{
			a = pop();

			b = pop();
	
			push(a + b);
		
		}
		else if (s[0] == '-')
		{
			b = pop();
		
			a = pop();
		
			push(a - b);
		
		}
		else if (s[0] == '*')
		{
			a = pop();
		
			b = pop();
		
			push(a*b);
		
		}
		else
		{
			push(atoi(s));

		}
		i++;
	}
	printf("%d\n", pop());
	return 0;

}

Compiler output:
main.c:4:1: error: unknown type name 'using'
    4 | using namespace std;
      | ^~~~~
main.c:4:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    4 | using namespace std;
      |                 ^~~
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

using namespace std;

int top,S[1000];


void push(int x){
    S[top+1] = x;
    top++;
}
int pop(){
    top--;
    return S[top+1];
}

int main(){

    int a,b;
    top = 0;
    char s[100];


    while(scanf("%s",&s)!=EOF){
        if(s[0] == '+'){
            a = pop();
            b = pop();
            push(a+b);
        } else if(s[0] == '-') {
            a = pop();
            b = pop();
            push(a-b);
        }else if(s[0] == '*') {
            a = pop();
            b = pop();
            push(a*b);
        } else {
            push(atoi(s));
        }
    }

    printf("%d\n",pop());
    return 0;
}

Compiler output:
main.c:5:1: error: unknown type name 'using'
    5 | using namespace std;
      | ^~~~~
main.c:5:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    5 | using namespace std;
      |                 ^~~
Language: C

#include<stdio.h>
#include <stdlib.h>
#include<string.h>

int top, S[1000];

void push(int x) {
	S[++top] = x;
}

int pop() {
	top--;
	return S[top + 1];
}

int main() {
	char s[100];
	int a, b;
	top = 0;

	while (scanf_s("%s", s, 1) != EOF) {
		if (s[0] == '+') {
			a = pop();
			b = pop();
			push(a + b);
		}
		else 	if (s[0] == '-') {
			a = pop();
			b = pop();
			push(a - b);
		}
		else 	if (s[0] == '*') {
			a = pop();
			b = pop();
			push(a * b);
		}
		else {
			push(atoi(s));
		}

	}
		printf("%d\n", pop());

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:21:16: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   21 |         while (scanf_s("%s", s, 1) != EOF) {
      |                ^~~~~~~
      |                scanf