criyle/codenet-compile-errors huggingface dataset:
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));
}
}
printf("%d\n",pop());
return 0;
}

Compiler output:
main.c:5:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    5 | int top.S[1000];
      |        ^
main.c: In function 'push':
main.c:7:1: error: 'S' undeclared (first use in this function)
    7 | S[top++]=x;
      | ^
main.c:7:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:3: error: 'top' undeclared (first use in this function)
    7 | S[top++]=x;
      |   ^~~
main.c: In function 'pop':
main.c:10:1: error: 'top' undeclared (first use in this function); did you mean 'pop'?
   10 | top--;
      | ^~~
      | pop
main.c:11:8: error: 'S' undeclared (first use in this function)
   11 | return S[top+1];
      |        ^
main.c: In function 'main':
main.c:15:1: error: 'top' undeclared (first use in this function); did you mean 'pop'?
   15 | top = 0;
      | ^~~
      | pop
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));
}
}
printf("%d\n",pop());
return 0;
}

Compiler output:
main.c:4:1: error: expected identifier or '(' before '?' token
    4 | ??
      | ^
main.c: In function 'push':
main.c:7:1: error: 'S' undeclared (first use in this function)
    7 | S[top++]=x;
      | ^
main.c:7:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:3: error: 'top' undeclared (first use in this function)
    7 | S[top++]=x;
      |   ^~~
main.c: In function 'pop':
main.c:10:1: error: 'top' undeclared (first use in this function); did you mean 'pop'?
   10 | top--;
      | ^~~
      | pop
main.c:11:8: error: 'S' undeclared (first use in this function)
   11 | return S[top+1];
      |        ^
main.c: In function 'main':
main.c:15:1: error: 'top' undeclared (first use in this function); did you mean 'pop'?
   15 | top = 0;
      | ^~~
      | pop
Language: C

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

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

int main(){
  int x,S[101],top=1;
  char s[100];

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

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


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

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

Compiler output:
main.c: In function 'main':
main.c:14:21: error: passing argument 1 of 'push' makes pointer from integer without a cast [-Wint-conversion]
   14 |       push(pop(&top)+pop(&top));
      |            ~~~~~~~~~^~~~~~~~~~
      |                     |
      |                     int
main.c:5:11: note: expected 'int *' but argument is of type 'int'
    5 | void push(int*,int);
      |           ^~~~
main.c:14:7: error: too few arguments to function 'push'
   14 |       push(pop(&top)+pop(&top));
      |       ^~~~
main.c:5:6: note: declared here
    5 | void push(int*,int);
      |      ^~~~
main.c:16:24: error: passing argument 1 of 'push' makes pointer from integer without a cast [-Wint-conversion]
   16 |       push(-1*pop(&top)+pop(&top))
      |            ~~~~~~~~~~~~^~~~~~~~~~
      |                        |
      |                        int
main.c:5:11: note: expected 'int *' but argument is of type 'int'
    5 | void push(int*,int);
      |           ^~~~
main.c:16:7: error: too few arguments to function 'push'
   16 |       push(-1*pop(&top)+pop(&top))
      |       ^~~~
main.c:5:6: note: declared here
    5 | void push(int*,int);
      |      ^~~~
main.c:16:35: error: expected ';' before '}' token
   16 |       push(-1*pop(&top)+pop(&top))
      |                                   ^
      |                                   ;
   17 |     } else if ( s[0] == '*' ){
      |     ~                              
main.c: In function 'push':
main.c:31:1: error: 'S' undeclared (first use in this function)
   31 | S[top]=x;
      | ^
main.c:31:1: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'pop':
main.c:36:8: error: 'S' undeclared (first use in this function)
   36 | return S[top+1];
      |        ^
Language: C

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

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

int main(){
  int x,S[101],top=1;
  char s[100];

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


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

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

Compiler output:
main.c: In function 'push':
main.c:31:1: error: 'S' undeclared (first use in this function)
   31 | S[top]=x;
      | ^
main.c:31:1: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'pop':
main.c:36:8: error: 'S' undeclared (first use in this function)
   36 | return S[top+1];
      |        ^
Language: C

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

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

int main(){
  int x,S[101],top=1;
  char s[100];

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


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

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

Compiler output:
main.c: In function 'main':
main.c:14:14: error: passing argument 2 of 'push' makes integer from pointer without a cast [-Wint-conversion]
   14 |       push(S,&top,pop(&top)+pop(&top));
      |              ^~~~
      |              |
      |              int *
main.c:5:16: note: expected 'int' but argument is of type 'int *'
    5 | void push(int*,int);
      |                ^~~
main.c:14:7: error: too many arguments to function 'push'
   14 |       push(S,&top,pop(&top)+pop(&top));
      |       ^~~~
main.c:5:6: note: declared here
    5 | void push(int*,int);
      |      ^~~~
main.c:16:14: error: passing argument 2 of 'push' makes integer from pointer without a cast [-Wint-conversion]
   16 |       push(S,&top,-1*pop(&top)+pop(&top));
      |              ^~~~
      |              |
      |              int *
main.c:5:16: note: expected 'int' but argument is of type 'int *'
    5 | void push(int*,int);
      |                ^~~
main.c:16:7: error: too many arguments to function 'push'
   16 |       push(S,&top,-1*pop(&top)+pop(&top));
      |       ^~~~
main.c:5:6: note: declared here
    5 | void push(int*,int);
      |      ^~~~
main.c:18:14: error: passing argument 2 of 'push' makes integer from pointer without a cast [-Wint-conversion]
   18 |       push(S,&top,pop(&top)*pop(&top));
      |              ^~~~
      |              |
      |              int *
main.c:5:16: note: expected 'int' but argument is of type 'int *'
    5 | void push(int*,int);
      |                ^~~
main.c:18:7: error: too many arguments to function 'push'
   18 |       push(S,&top,pop(&top)*pop(&top));
      |       ^~~~
main.c:5:6: note: declared here
    5 | void push(int*,int);
      |      ^~~~
main.c: At top level:
main.c:29:6: error: conflicting types for 'push'; have 'void(int *, int *, int)'
   29 | void push(int S[],int *top,int x){
      |      ^~~~
main.c:5:6: note: previous declaration of 'push' with type 'void(int *, int)'
    5 | void push(int*,int);
      |      ^~~~
main.c: In function 'push':
main.c:31:2: error: array subscript is not an integer
   31 | S[top]=x;
      |  ^
main.c: At top level:
main.c:34:5: error: conflicting types for 'pop'; have 'int(int *, int *)'
   34 | int pop(int S[],int *top){
      |     ^~~
main.c:6:5: note: previous declaration of 'pop' with type 'int(int *)'
    6 | int pop(int*);
      |     ^~~
main.c: In function 'pop':
main.c:36:9: error: array subscript is not an integer
   36 | return S[top+1];
      |         ^
Language: C

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

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

int main(){
  int x,S[101],top=1;
  char s[100];

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


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

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

Compiler output:
main.c: In function 'main':
main.c:14:19: error: too few arguments to function 'pop'
   14 |       push(S,&top,pop(&top)+pop(&top));
      |                   ^~~
main.c:6:5: note: declared here
    6 | int pop(int*,int*);
      |     ^~~
main.c:14:29: error: too few arguments to function 'pop'
   14 |       push(S,&top,pop(&top)+pop(&top));
      |                             ^~~
main.c:6:5: note: declared here
    6 | int pop(int*,int*);
      |     ^~~
main.c:16:22: error: too few arguments to function 'pop'
   16 |       push(S,&top,-1*pop(&top)+pop(&top));
      |                      ^~~
main.c:6:5: note: declared here
    6 | int pop(int*,int*);
      |     ^~~
main.c:16:32: error: too few arguments to function 'pop'
   16 |       push(S,&top,-1*pop(&top)+pop(&top));
      |                                ^~~
main.c:6:5: note: declared here
    6 | int pop(int*,int*);
      |     ^~~
main.c:18:19: error: too few arguments to function 'pop'
   18 |       push(S,&top,pop(&top)*pop(&top));
      |                   ^~~
main.c:6:5: note: declared here
    6 | int pop(int*,int*);
      |     ^~~
main.c:18:29: error: too few arguments to function 'pop'
   18 |       push(S,&top,pop(&top)*pop(&top));
      |                             ^~~
main.c:6:5: note: declared here
    6 | int pop(int*,int*);
      |     ^~~
main.c:21:17: error: passing argument 2 of 'push' makes pointer from integer without a cast [-Wint-conversion]
   21 |       push(&top,x);
      |                 ^
      |                 |
      |                 int
main.c:5:16: note: expected 'int *' but argument is of type 'int'
    5 | void push(int*,int*,int);
      |                ^~~~
main.c:21:7: error: too few arguments to function 'push'
   21 |       push(&top,x);
      |       ^~~~
main.c:5:6: note: declared here
    5 | void push(int*,int*,int);
      |      ^~~~
main.c: In function 'push':
main.c:31:2: error: array subscript is not an integer
   31 | S[top]=x;
      |  ^
main.c: In function 'pop':
main.c:36:9: error: array subscript is not an integer
   36 | return S[top+1];
      |         ^
Language: C

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

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

int main(){
  int x,S[101],top=1;
  char s[100];

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


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

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

Compiler output:
main.c: In function 'main':
main.c:21:17: error: passing argument 2 of 'push' makes pointer from integer without a cast [-Wint-conversion]
   21 |       push(&top,x);
      |                 ^
      |                 |
      |                 int
main.c:5:16: note: expected 'int *' but argument is of type 'int'
    5 | void push(int*,int*,int);
      |                ^~~~
main.c:21:7: error: too few arguments to function 'push'
   21 |       push(&top,x);
      |       ^~~~
main.c:5:6: note: declared here
    5 | void push(int*,int*,int);
      |      ^~~~
main.c: In function 'push':
main.c:31:2: error: array subscript is not an integer
   31 | S[top]=x;
      |  ^
main.c: In function 'pop':
main.c:36:9: error: array subscript is not an integer
   36 | return S[top+1];
      |         ^
Language: C

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

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

int main(){
  int x,S[101],top=1,y,z;
  char s[100];

  while( scanf("%s", s) != EOF ){
    if ( s[0] == '+' ){
      y=pop(S,&top),z=pop(S,&top);
      push(S,&top,y+z);
    } else if ( s[0] == '-' ){
      y=pop(S,&top),z=pop(S,&top);
      push(S,&top,z-y);
    } else if ( s[0] == '*' ){
      y=pop(S,&top),z=pop(S,&top);
      push(S,&top,y*z)
    } else {
      x = atoi(s);
      push(S,&top,x);
    }
  }
  printf("%d\n",S[1]);
  return 0;
}


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

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

Compiler output:
main.c: In function 'main':
main.c:21:23: error: expected ';' before '}' token
   21 |       push(S,&top,y*z)
      |                       ^
      |                       ;
   22 |     } else {
      |     ~
Language: C

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

struct Stack
{
	int data[100];
	int p;
}stk;

//Stack stk;

void push(int n)
{
	stk.p++;
	stk.data[stk.p] = n;
}

int pop()
{
	int d = stk.data[stk.p];
	stk.p--;
	return d;
}

bool isStackFull()
{
	if (stk.p == sizeof(stk.data) - 1)
	{
		return true;
	}
	return false;
}

bool isStackEmpty()
{
	if (stk.p == 0)
	{
		return true;
	}
	return false;
}

void initialize()
{
	stk.p = 0;
	memset(stk.data, 0, sizeof(stk.data));
}

int main()
{
	initialize();

	char item[100];
	int op1, op2;
	while (scanf("%s", item) != EOF)
	{
		switch (item[0])
		{
		case '+':
			op1 = pop();
			op2 = pop();
			push(op2 + op1);
			break;

		case '-':
			op1 = pop();
			op2 = pop();
			push(op2 - op1);
			break;

		case '*':
			op1 = pop();
			op2 = pop();
			push(op2 * op1);
			break;

		default:
			push(atoi(item));
			break;
		}
	}
	printf("%d\n", pop());

	return 0;
}

Compiler output:
main.c:26:1: error: unknown type name 'bool'
   26 | bool isStackFull()
      | ^~~~
main.c:4:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    3 | #include<stdlib.h>
  +++ |+#include <stdbool.h>
    4 | 
main.c: In function 'isStackFull':
main.c:30:24: error: 'true' undeclared (first use in this function)
   30 |                 return true;
      |                        ^~~~
main.c:30:24: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:30:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:32:16: error: 'false' undeclared (first use in this function)
   32 |         return false;
      |                ^~~~~
main.c:32:16: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c: At top level:
main.c:35:1: error: unknown type name 'bool'
   35 | bool isStackEmpty()
      | ^~~~
main.c:35:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c: In function 'isStackEmpty':
main.c:39:24: error: 'true' undeclared (first use in this function)
   39 |                 return true;
      |                        ^~~~
main.c:39:24: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:41:16: error: 'false' undeclared (first use in this function)
   41 |         return false;
      |                ^~~~~
main.c:41:16: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C

#include <stdio.h>
#include <ctype.h>

int main(void)
{
	char InputBuff[100000297];	/* operand(1000000 * 100) + operator(99) + space(198) */
	int  Stack[200];
	int  InputPoint;
	int  StackPoint;
	int  Value;
	int  MinusFlag;
	char ch;
	scanf("Input Data:%s", InputBuff);
	
	InputPoint = 0;
	StackPoint = 0;
	ch = InputBuff[InputPoint];
	while(ch != '\0')
	{
		if(ch == '-') /* minus */
		{
			if(isspace(InputBuff[InputPoint + 1]) != 0) /* operator */
			{
				Value = Stack[StackPoint-2] - Stack[StackPoint-1]; /* Caluculation */
				Stack[StackPoint-2] = Value;
				StackPoint--;
			}
			else /* minus sign */ 
			{
				InputPoint++;
				Value = getValue(&(InputBuff[InputPoint]), &InputPoint);
				Stack[StackPoint] = -1 * Value;
				StackPoint++;
			}
		}
		else if(ch == '+') /* plus */
		{
			Value = Stack[StackPoint-2] + Stack[StackPoint-1]; /* Caluculation */
			Stack[StackPoint-2] = Value;
			StackPoint--;
		}
		else if(ch == '*') /* multiply */
		{
			Value = Stack[StackPoint-2] * Stack[StackPoint-1]; /* Caluculation */
			Stack[StackPoint-2] = Value;
			StackPoint--;
		}
		else if(isdgit((unsigned char)ch) != 0)	/* judge operand */
		{
			Value = getValue(&(InputBuff[InputPoint]), &InputPoint);
			Stack[StackPoint] = Value;
			StackPoint++;
		}
		else if(isspace(ch) != 0)	/* judge space */
		{
			InputPoint++;
		}
		else
		{
			/* Bad Charactor */
		}
	}
	
	printf("Result = %d\n", Stack[0]);
}

/* suuti hennkan */
int getValue(char * InputBuff, int * InputPoint)
{
	char ToAtoi[7];
	int  ValueDigits;
	
	ValueDigits=0;
	while(isdgit(InputBuff[(*InputPoint)]) != 0)
	{
		ToAtoi[ValueDigits] = InputBuff[(*InputPoint)];
		ValueDigits++;
		(*InputPoint)++;
	}
	ToAtoi[ValueDigits] = '\0';
	
	return atoi(ToAtoi);
}

Compiler output:
main.c: In function 'main':
main.c:31:41: error: implicit declaration of function 'getValue' [-Wimplicit-function-declaration]
   31 |                                 Value = getValue(&(InputBuff[InputPoint]), &InputPoint);
      |                                         ^~~~~~~~
main.c:48:25: error: implicit declaration of function 'isdgit'; did you mean 'isdigit'? [-Wimplicit-function-declaration]
   48 |                 else if(isdgit((unsigned char)ch) != 0) /* judge operand */
      |                         ^~~~~~
      |                         isdigit
main.c: In function 'getValue':
main.c:82:16: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
   82 |         return atoi(ToAtoi);
      |                ^~~~
Language: C

#include<stdio.h>
int main(void){
    char c;
    int a[2000];
    int i=0;
    while((scanf("%c ", &c))!=null){
    if(isdigit(c)){
        a[i]=atoi(c);
        i++;
    }
    else{
        Switch(c){
        case '%':
        a[i-1]=a[i]/a[i-1];
        i--;
        case '*':
        a[i-1]=a[i]*a[i-1];
        i--;
        case '+'
        a[i-1]=a[i]+a[i-1];
        i--;
        case '-':
        a[i-1]=a[i]-a[i-1];
        i--;
        defalt:
}

    }
}
    printf("%d\n"a[i]);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:31: error: 'null' undeclared (first use in this function)
    6 |     while((scanf("%c ", &c))!=null){
      |                               ^~~~
main.c:6:31: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:8: error: implicit declaration of function 'isdigit' [-Wimplicit-function-declaration]
    7 |     if(isdigit(c)){
      |        ^~~~~~~
main.c:2:1: note: include '<ctype.h>' or provide a declaration of 'isdigit'
    1 | #include<stdio.h>
  +++ |+#include <ctype.h>
    2 | int main(void){
main.c:8:14: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
    8 |         a[i]=atoi(c);
      |              ^~~~
main.c:12:9: error: implicit declaration of function 'Switch' [-Wimplicit-function-declaration]
   12 |         Switch(c){
      |         ^~~~~~
main.c:12:18: error: expected ';' before '{' token
   12 |         Switch(c){
      |                  ^
      |                  ;
main.c:30:18: error: expected ')' before 'a'
   30 |     printf("%d\n"a[i]);
      |           ~      ^
      |                  )
Language: C

#include <stdio.h>
#define MAX 10000

int initialize();
int isEmpty();
int isFull();
int push(int x);
int pop(int x);

int top=0;
int S[MAX];

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


}

int initialize(){
	top=0;
}

int isEmpty(){
	return top==0;
}

int isFull(){
	return top >= MAX-1;
}

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

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

Compiler output:
main.c: In function 'main':
main.c:19:27: error: too few arguments to function 'pop'
   19 |                         a=pop();
      |                           ^~~
main.c:8:5: note: declared here
    8 | int pop(int x);
      |     ^~~
main.c:20:27: error: too few arguments to function 'pop'
   20 |                         b=pop();
      |                           ^~~
main.c:8:5: note: declared here
    8 | int pop(int x);
      |     ^~~
main.c:23:27: error: too few arguments to function 'pop'
   23 |                         a=pop();
      |                           ^~~
main.c:8:5: note: declared here
    8 | int pop(int x);
      |     ^~~
main.c:24:27: error: too few arguments to function 'pop'
   24 |                         b=pop();
      |                           ^~~
main.c:8:5: note: declared here
    8 | int pop(int x);
      |     ^~~
main.c:27:27: error: too few arguments to function 'pop'
   27 |                         a=pop();
      |                           ^~~
main.c:8:5: note: declared here
    8 | int pop(int x);
      |     ^~~
main.c:28:27: error: too few arguments to function 'pop'
   28 |                         b=pop();
      |                           ^~~
main.c:8:5: note: declared here
    8 | int pop(int x);
      |     ^~~
main.c:31:30: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
   31 |                         push(atoi(str));
      |                              ^~~~
main.c:33:31: error: too few arguments to function 'pop'
   33 |                 printf("%d\n",pop());
      |                               ^~~
main.c:8:5: note: declared here
    8 | int pop(int x);
      |     ^~~
main.c: At top level:
main.c:52:6: error: conflicting types for 'push'; have 'void(int)'
   52 | void push(int x){
      |      ^~~~
main.c:7:5: note: previous declaration of 'push' with type 'int(int)'
    7 | int push(int x);
      |     ^~~~
main.c: In function 'push':
main.c:53:29: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   53 |         if(isFull()) return -1;
      |                             ^
main.c:52:6: note: declared here
   52 | void push(int x){
      |      ^~~~
main.c: In function 'pop':
main.c:58:1: error: number of arguments doesn't match prototype
   58 | int pop(){
      | ^~~
main.c:8:5: error: prototype declaration
    8 | int pop(int x);
      |     ^~~
Language: C

#include <stdio.h>
#define MAX 10000

int initialize();
int isEmpty();
int isFull();
int push(int x);
int pop();

int top=0;
int S[MAX];

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


}

int initialize(){
	top=0;
}

int isEmpty(){
	return top==0;
}

int isFull(){
	return top >= MAX-1;
}

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

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

Compiler output:
main.c: In function 'main':
main.c:31:30: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
   31 |                         push(atoi(str));
      |                              ^~~~
main.c: At top level:
main.c:52:6: error: conflicting types for 'push'; have 'void(int)'
   52 | void push(int x){
      |      ^~~~
main.c:7:5: note: previous declaration of 'push' with type 'int(int)'
    7 | int push(int x);
      |     ^~~~
main.c: In function 'push':
main.c:53:29: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   53 |         if(isFull()) return -1;
      |                             ^
main.c:52:6: note: declared here
   52 | void push(int x){
      |      ^~~~
Language: C

#include <stdio.h>
#include <stdlib.h>
int main(void){
    char c;
    int a[2000];
    int i=0;
    while((scanf("%c ", &c))!=null){
    if(isdigit(c)){
        a[i]=atoi(c);
        i++;
    }
    else{
        Switch(c){
        case '%':
        a[i-1]=a[i]/a[i-1];
        i--;
        case '*':
        a[i-1]=a[i]*a[i-1];
        i--;
        case '+'
        a[i-1]=a[i]+a[i-1];
        i--;
        case '-':
        a[i-1]=a[i]-a[i-1];
        i--;
        defalt:
}

    }
}
    printf("%d\n",a[i]);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:31: error: 'null' undeclared (first use in this function)
    7 |     while((scanf("%c ", &c))!=null){
      |                               ^~~~
main.c:7:31: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:8: error: implicit declaration of function 'isdigit' [-Wimplicit-function-declaration]
    8 |     if(isdigit(c)){
      |        ^~~~~~~
main.c:3:1: note: include '<ctype.h>' or provide a declaration of 'isdigit'
    2 | #include <stdlib.h>
  +++ |+#include <ctype.h>
    3 | int main(void){
main.c:9:19: error: passing argument 1 of 'atoi' makes pointer from integer without a cast [-Wint-conversion]
    9 |         a[i]=atoi(c);
      |                   ^
      |                   |
      |                   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:13:9: error: implicit declaration of function 'Switch' [-Wimplicit-function-declaration]
   13 |         Switch(c){
      |         ^~~~~~
main.c:13:18: error: expected ';' before '{' token
   13 |         Switch(c){
      |                  ^
      |                  ;
Language: C

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
typedef float Item;
static Item *s;
static int N;
void STACKinit(int);
int STACKempty(void);
void STACKpush(Item);
Item STACKpop(void);
int main(void){
  char a[300];
  int i=0;
  scanf("%[^\n]",a);
  int n=strlen(a);
  STACKinit(214748364);
  while(STACKempty()!=0){
    for(i=0;i<n;i++){
      if(a[i]=='+'){
	STACKpush(STACKpop()+STACKpop());
      }
      if(a[i]=='-'){
	int l=STACKpop();
	STACKpush(STACKpop()-l);
      }
      if(a[i]=='*'){
	STACKpush(STACKpop()*STACKpop());
      }
      if((a[i]>='0')&&(a[i]<='9')){
	STACKpush(0);
      }
      while((a[i]>='0')&&(a[i]<='9')){
	STACKpush(10*STACKpop()+(a[i++]-'0'));
      }
    }
  }
  printf("%d\n",(int)STACKpop());
  return 0;
}
void STACKinit(int maxN){
  s=malloc(maxN*sizeof(Item));
  N=0;
}
int STACKempty(void){
  return N==0;
}
void STACKpush(Item item){
  s[N++]=item;
}

Compiler output:
/usr/bin/ld: /tmp/ccYjdI5g.o: in function `main':
main.c:(.text+0x6f): undefined reference to `STACKpop'
/usr/bin/ld: main.c:(.text+0x7c): undefined reference to `STACKpop'
/usr/bin/ld: main.c:(.text+0xaa): undefined reference to `STACKpop'
/usr/bin/ld: main.c:(.text+0xb6): undefined reference to `STACKpop'
/usr/bin/ld: main.c:(.text+0xee): undefined reference to `STACKpop'
/usr/bin/ld: /tmp/ccYjdI5g.o:main.c:(.text+0xfb): more undefined references to `STACKpop' follow
collect2: error: ld returned 1 exit status
Language: C

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
typedef int Item;
static Item *s;
static int N;
void STACKinit(int);
int STACKempty(void);
void STACKpush(Item);
Item STACKpop(void);
int main(void){
  char a[300];
  int i=0;
  scanf("%[^\n]",a);
  int n=strlen(a);
  STACKinit(214748364);
  while(STACKempty()!=0){
    for(i=0;i<n;i++){
      if(a[i]=='+'){
	STACKpush(STACKpop()+STACKpop());
      }
      if(a[i]=='-'){
	int l=STACKpop();
	STACKpush(STACKpop()-l);
      }
      if(a[i]=='*'){
	STACKpush(STACKpop()*STACKpop());
      }
      if((a[i]>='0')&&(a[i]<='9')){
	STACKpush(0);
      }
      while((a[i]>='0')&&(a[i]<='9')){
	STACKpush(10*STACKpop()+(a[i++]-'0'));
      }
    }
  }
  printf("%d\n",STACKpop());
  return 0;
}
void STACKinit(int maxN){
  s=malloc(maxN*sizeof(Item));
  N=0;
}
int STACKempty(void){
  return N==0;
}
void STACKpush(Item item){
  s[N++]=item;
}

Compiler output:
/usr/bin/ld: /tmp/ccUiYGb8.o: in function `main':
main.c:(.text+0x70): undefined reference to `STACKpop'
/usr/bin/ld: main.c:(.text+0x77): undefined reference to `STACKpop'
/usr/bin/ld: main.c:(.text+0x96): undefined reference to `STACKpop'
/usr/bin/ld: main.c:(.text+0x9e): undefined reference to `STACKpop'
/usr/bin/ld: main.c:(.text+0xbe): undefined reference to `STACKpop'
/usr/bin/ld: /tmp/ccUiYGb8.o:main.c:(.text+0xc5): more undefined references to `STACKpop' follow
collect2: error: ld returned 1 exit status
Language: C

#include <stdio.h>
#include <ctype.h>

int getValue(char TopCh);

int main(void)
{
	int  Stack[100];  /* operand(100) */
	int  StackPoint;
	int  Value;
	char ch;
	
	StackPoint = 0;
	while(scanf("%c", &ch) != EOF)
	{
		if(ch == '-') /* minus */
		{
			Value = Stack[StackPoint-2] - Stack[StackPoint-1]; /* Caluculation */
			Stack[StackPoint-2] = Value;
			StackPoint--;
		}
		else if(ch == '+') /* plus */
		{
			Value = Stack[StackPoint-2] + Stack[StackPoint-1]; /* Caluculation */
			Stack[StackPoint-2] = Value;
			StackPoint--;
		}
		else if(ch == '*') /* multiply */
		{
			Value = Stack[StackPoint-2] * Stack[StackPoint-1]; /* Caluculation */
			Stack[StackPoint-2] = Value;
			StackPoint--;
		}
		else if(isdigit((unsigned char)ch) != 0)	/* judge operand */
		{
			Value = getValue(ch);
			Stack[StackPoint] = Value;
			StackPoint++;
		}
		else	/* Space or Bad Charactor*/
		{
		}
		
	}
	
	printf("%d\n", Stack[0]);
	
	return 0;
}

/* suuti hennkan */
int getValue(char TopCh)
{
	char ToAtoi[7] = {0};
	int  ValueDigits;
	char ch;
	
	ToAtoi[0] = TopCh;
	ValueDigits=1;
	do{
		scanf("%c", &ch);
		ToAtoi[ValueDigits] = ch;
		ValueDigits++;
	}while(isdigit(ch) != 0)
	
	return atoi(ToAtoi);
}

Compiler output:
main.c: In function 'getValue':
main.c:64:33: error: expected ';' before 'return'
   64 |         }while(isdigit(ch) != 0)
      |                                 ^
      |                                 ;
   65 | 
   66 |         return atoi(ToAtoi);
      |         ~~~~~~
Language: C

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


int main(){
  int i;
  char s[100];
  int x[100];
  for(i=0;i<100;i++){
    x[i]=0;
  }
  i=0;
  while(scanf("%s",s)!=EOF){
    if(s[0]=='+'){
      x[i-2]=x[i-1]+x[i-2];
      i--;
    }else if(s[0]=='-'){
      x[i-2]=x[i-2]-x[i-1];
      i--;
    }else if(s[0]=='*'){
      x[i-2]=x[i-1]*x[i-2];
      i--;
    }else{
      x[i]=atoi(s);
      i++;
    }
  }
  printf("%d\n",x[i-1]);

  return 0;

Compiler output:
main.c: In function 'main':
main.c:31:3: error: expected declaration or statement at end of input
   31 |   return 0;
      |   ^~~~~~
Language: C

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
typedef float Item;
static Item *s;
static int N;
void STACKinit(int);
int STACKempty(void);
void STACKpush(Item);
Item STACKpop(void);
int main(void){
  char a[300];
  int i=0;
  scanf("%[^\n]",a);
  int n=strlen(a);
  int stackin=0;
  STACKinit(214748364);
  for(i=0;i<n;i++){
    if(a[i]=='+'){
      STACKpush(STACKpop()+STACKpop());
      stackin--;
      ???//printf("stackin=%d\n",stackin);
    }
    if(a[i]=='-'){
      int l=STACKpop();
      STACKpush(STACKpop()-l);
    }
    if(a[i]=='*'){
      STACKpush(STACKpop()*STACKpop());
    }
    if((a[i]>='0')&&(a[i]<='9')){
      STACKpush(0);
    }
    while((a[i]>='0')&&(a[i]<='9')){
      STACKpush(10*STACKpop()+(a[i++]-'0'));
      stackin++;
      //printf("stackin=%d\n",stackin);
    }
  }
  printf("%d\n",(int)STACKpop());
  return 0;
}
void STACKinit(int maxN){
  s=malloc(maxN*sizeof(Item));
  N=0;
}
int STACKempty(void){
  return N==0;
}
void STACKpush(Item item){
  s[N++]=item;
}
Item STACKpop(void){
  return s[--N];
}

Compiler output:
main.c: In function 'main':
main.c:22:8: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]
   22 |       ???//printf("stackin=%d\n",stackin);
main.c:22:7: error: expected expression before '?' token
   22 |       ???//printf("stackin=%d\n",stackin);
      |       ^
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define M 2000;
int main(void){
  int i=0,j=0;
  char op,c;
  int stack[M],num,flag;
  for(i=0;i<M;i++){
    stack[i]='\0';
  }
  i=0;
  while(1){
    flag=-1;
    c=getchar();
    if(feof(stdin)!=0){
      break;
    }
    if('1'<=c && c<='9'){
      ungetc(c,stdin);
      flag=1;
      scanf("%d",&num);
    }else if(c!=' ' && c!='\n'){
      ungetc(c,stdin);
      flag=0;
      scanf("%c",&op);
    }
    if(flag==1){
      stack[j]=num;
    }
    if(flag==0){
      stack[j]=op;
    }
    if(stack[j]=='+' && flag==0){
      stack[j-2]=stack[j-2]+stack[j-1];
      stack[j]='\0';
      stack[j-1]='\0';
      j=j-2;
    }else if(stack[j]=='-'&& flag==0){
      stack[j-2]=stack[j-2]-stack[j-1];
      stack[j]='\0';
      stack[j-1]='\0';
      j=j-2;
    }else if(stack[j]=='*'&& flag==0){
      stack[j-2]=stack[j-2]*stack[j-1];
      stack[j]='\0';
      stack[j-1]='\0';
      j=j-2;
    }
    if(flag==0 || flag==1){
      j++;
    }
  }
  printf("%d\n",stack[0]);
}

Compiler output:
main.c: In function 'main':
main.c:4:15: error: expected ']' before ';' token
    4 | #define M 2000;
      |               ^
main.c:8:13: note: in expansion of macro 'M'
    8 |   int stack[M],num,flag;
      |             ^
main.c:9:14: error: expected expression before ';' token
    9 |   for(i=0;i<M;i++){
      |              ^
main.c:10:5: error: 'stack' undeclared (first use in this function)
   10 |     stack[i]='\0';
      |     ^~~~~
main.c:10:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:5: error: 'flag' undeclared (first use in this function)
   14 |     flag=-1;
      |     ^~~~
main.c:22:19: error: 'num' undeclared (first use in this function)
   22 |       scanf("%d",&num);
      |                   ^~~
Language: C

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void push(int a[],char c,int *top)
{
	switch(c)
	{
		case '+':a[*top-1]=a[*top-1]+a[*top];*top=*top-1;break;
		case '-':a[*top-1]=a[*top-1]-a[*top];*top=*top-1;break;
		case '*':a[*top-1]=a[*top-1]*a[*top];*top=*top-1;break;
	}	
}

int main(int argc, char *argv[])
{
	char a[1000],num[1000];
	int b[100];
	int i,top=-1,j=0;//j????¬???¬??¢?????°??? 
	gets(a);
	for(i=0;i<strlen(a);i++)
	{
		if(i+1!=strlen(a)&&a[i]=='-'&&a[i+1]!=' ')//?´???° 
		{
			num[j]='-';
			j++;
		}		
		else if(a[i]>='0'&&a[i]<='9')//?????????????????????????????\?????¨?????\
		{
			num[j]=a[i];
			j++;
			if(a[i+1]==' ')
			{
				top++;
				num[j]='\0';
				b[top]=atoi(num);
				j=0;
			}
		}
	 	else if(a[i]!=' ')
		{
			push(b,a[i],&top);//??°?????°??????????¬?????????¶ 
		}
		
	}
	printf("%d\n",b[top]);
}

Compiler output:
main.c: In function 'main':
main.c:19:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   19 |         gets(a);
      |         ^~~~
      |         fgets
main.c:39:17: error: 'else' without a previous 'if'
   39 |                 else if(a[i]!=' ')
      |                 ^~~~
main.c: At top level:
main.c:45:16: error: expected declaration specifiers or '...' before string constant
   45 |         printf("%d\n",b[top]);
      |                ^~~~~~
main.c:45:23: error: unknown type name 'b'
   45 |         printf("%d\n",b[top]);
      |                       ^
main.c:46:1: error: expected identifier or '(' before '}' token
   46 | }
      | ^
Language: C

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void push(int a[],char c,int *top)
{
	switch(c)
	{
		case '+':a[*top-1]=a[*top-1]+a[*top];*top=*top-1;break;
		case '-':a[*top-1]=a[*top-1]-a[*top];*top=*top-1;break;
		case '*':a[*top-1]=a[*top-1]*a[*top];*top=*top-1;break;
	}	
}

int main(int argc, char *argv[])
{
	char a[1000000000],num[1000000000];
	int b[100];
	int i,top=-1,j=0;//j????¬???¬??¢?????°??? 
	gets(a);
	for(i=0;i<strlen(a);i++)
	{
		if(i+1!=strlen(a)&&a[i]=='-'&&a[i+1]!=' ')//?´???° 
		{
			num[j]='-';
			j++;
		}		
		else if(a[i]>='0'&&a[i]<='9')//?????????????????????????????\?????¨?????\
		{
			num[j]=a[i];
			j++;
			if(a[i+1]==' ')
			{
				top++;
				num[j]='\0';
				b[top]=atoi(num);
				j=0;
			}
		}
	 	else if(a[i]!=' ')
		{
			push(b,a[i],&top);//??°?????°??????????¬?????????¶ 
		}
		
	}
	printf("%d\n",b[top]);
}

Compiler output:
main.c: In function 'main':
main.c:19:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   19 |         gets(a);
      |         ^~~~
      |         fgets
main.c:39:17: error: 'else' without a previous 'if'
   39 |                 else if(a[i]!=' ')
      |                 ^~~~
main.c: At top level:
main.c:45:16: error: expected declaration specifiers or '...' before string constant
   45 |         printf("%d\n",b[top]);
      |                ^~~~~~
main.c:45:23: error: unknown type name 'b'
   45 |         printf("%d\n",b[top]);
      |                       ^
main.c:46:1: error: expected identifier or '(' before '}' token
   46 | }
      | ^
Language: C

#include <cmath>
#include <iostream>
using namespace std;
int s[105],p=0;
char in[10];
int main()
{
    while(cin>>in)
    {
        if(in[0]=='+')
        {
            int a=s[p--],b=s[p--];
            s[++p]=a+b;
        }
        else if(in[0]=='-')
        {
            int a=s[p--],b=s[p--];
            s[++p]=b-a;
        }
        else if(in[0]=='*')
        {
            int a=s[p--],b=s[p--];
            s[++p]=a*b;
        }
        else s[++p]=atoi(in);
    }
    cout<<s[1];
    return 0;
}


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

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <stack>
using namespace std;
stack <int>reversh_polish;//不返回值
int main(void)
{
	int a, b;
	char s[100];

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


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

//#include <bits/stdc++.h>
#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <vector>
#define _ ios_base::sync_with_stdio(0);cin.tie(0);
#define clr(a) memset(a, 0x00, sizeof(a))
#define Error(x) cout << #x << " = " << x << endl
#define iDEBUG freopen("in.txt", "r", stdin)
#define oDEBUG freopen("out.txt","w",stdout)
#define pb push_back
#define pp pop_back
#define x first
#define y second
#define all(x) x.begin(),x.end()
#define hi cout << "hi" << endl
typedef long long ll;

using namespace std;

int main()
{
    //iDEBUG;

    string str;
    getline(cin, str);
    vector<int> vec;

    for(int i=0; i<str.length(); i++)
    {
        if(str[i] == ' ')
            continue;
        if(str[i]>='0' && str[i]<='9')
            vec.pb(str[i]-'0');
        else
        {
            int a, b;
            b = vec.back(); vec.pp();
            a = vec.back(); vec.pp();
            switch(str[i])
            {
                case '+':
                    a += b;
                    break;
                case '-':
                    a -= b;
                    break;
                case '*':
                    a *= b;
                    break;
            }
            vec.pb(a);
        }
    }
    cout << vec.back() << endl;

    return 0;
}



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

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

bool is_operator(char* s){
    if(s[0] == '+' || s[0] == '-' || s[0] == '*'){
        return true;
    }else{
        return false;
    }
}

int pop(int* A, int* cnt){
    (*cnt)--;
    return A[*cnt];
}

void push(int* A, int* cnt, int value){
    A[*cnt] = value;
    (*cnt)++;
}

int main(void){
    int A[200];
    char s[20];
    int cnt = 0;

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



Compiler output:
main.c:4:1: error: unknown type name 'bool'
    4 | bool is_operator(char* s){
      | ^~~~
main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    2 | #include <stdlib.h>
  +++ |+#include <stdbool.h>
    3 | 
main.c: In function 'is_operator':
main.c:6:16: error: 'true' undeclared (first use in this function)
    6 |         return true;
      |                ^~~~
main.c:6:16: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:6:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:16: error: 'false' undeclared (first use in this function)
    8 |         return false;
      |                ^~~~~
main.c:8:16: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
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", 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 'main':
main.c:21:15: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   21 |         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;
}

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));
		}
	}



Compiler output:
main.c: In function 'main':
main.c:37:9: error: expected declaration or statement at end of input
   37 |         }
      |         ^
Language: C

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

#define STACK_SIZE 1000
#define MAX_LENGTH 1000

int stack[STACK_SIZE];
int stack_size = 0;

int pop() {
  if (stack_size <= 0) {
    return stack[--stack_size];
  }
}

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

int check_number(char *s) {
  // 符号あり
  if (*s == '+' || *s == '-') {
    s++;
    if (*s >= '0' && *s <= '9') {
      return 1;
    } else {
      return 0;
    }
  }
  // 符号なし
  if (*s >= '0' && *s <= '9') {
    return 1;
  } else {
    return 0;
  }
}

int get_number(char *s) {
  int sign = 0;
  int n = 0;

  if (*s == '+') {
    s++;
  } else if (*s == '-') {
    sign = 1;
    s++;
  }
  while(*s >= '0' && *s <= '9') {
    n = n * 10 + (*s - '0');
    s++;
  }
  if (sign) {
    return -n;
  } else {
    return n;
  }
}

int calc(char *s) {
  int x, y, n;

  while(*s) {
    if (check_number(s)) {
      n = get_number(s);
      push(n);
      while (*s == '+' || *s == '-') {
        s++;
      }
      while (n) {
        n /= 10;
        s++;
      }
    } else {
      switch (*s) {
        case '+':
          a = pop();
          b = pop();
          push(b+a);
          break;
        case '-':
          a = pop();
          b = pop();
          push(b-a);
          break;
        case '*':
          a = pop();
          b = pop();
          push(b*a);
          break;
      }
      s++;
    }
  }
  return pop();
}

int main() {
  char s[MAX_LENGTH];
  scanf("%[^\n]*s", s);
	printf("%d\n", calc_rpn(s));
  
  return 0;
}



Compiler output:
main.c: In function 'calc':
main.c:76:11: error: 'a' undeclared (first use in this function)
   76 |           a = pop();
      |           ^
main.c:76:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:77:11: error: 'b' undeclared (first use in this function)
   77 |           b = pop();
      |           ^
main.c: In function 'main':
main.c:100:24: error: implicit declaration of function 'calc_rpn' [-Wimplicit-function-declaration]
  100 |         printf("%d\n", calc_rpn(s));
      |                        ^~~~~~~~
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:10:5: error: implicit declaration of function 'pop'; did you mean 'popen'? [-Wimplicit-function-declaration]
   10 | y = pop();
      |     ^~~
      |     popen
main.c:11:1: error: implicit declaration of function 'push' [-Wimplicit-function-declaration]
   11 | push(pop() + y);
      | ^~~~