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() {
	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 {
			int i = stoi(s);
			push(i);
		}

	}
		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
main.c:38:33: error: implicit declaration of function 'stoi'; did you mean 'atoi'? [-Wimplicit-function-declaration]
   38 |                         int i = stoi(s);
      |                                 ^~~~
      |                                 atoi
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) != 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 {
			int i = stoi(s);
			push(i);
		}

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

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:38:33: error: implicit declaration of function 'stoi'; did you mean 'atoi'? [-Wimplicit-function-declaration]
   38 |                         int i = stoi(s);
      |                                 ^~~~
      |                                 atoi
Language: C

include <stdio.h>
#define STACK_SIZE 100

int stack[STACK_SIZE];
int stack_size = 0;

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

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

int calc(char *s)
{
  int a, b, type;
  while (*s) {
    switch(*s) {
    case ' ':
      break;
    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;
    default:
      push(*s - '0');
    }
    s++;
  }
  return pop();
}

int main()
{
  char s[100];
  scanf("%[^\n]*s", s);
  printf("%d\n", calc(s));
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
main.c: In function 'pop':
main.c:10:10: error: 'stack' undeclared (first use in this function)
   10 |   return stack[--stack_size];
      |          ^~~~~
main.c:10:10: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'push':
main.c:15:3: error: 'stack' undeclared (first use in this function)
   15 |   stack[stack_size++] = a;
      |   ^~~~~
main.c: In function 'main':
main.c:51:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   51 |   scanf("%[^\n]*s", s);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include <stdio.h>
main.c:51:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   51 |   scanf("%[^\n]*s", s);
      |   ^~~~~
main.c:51:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:52:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   52 |   printf("%d\n", calc(s));
      |   ^~~~~~
main.c:52:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:52:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:52:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

int pop();
int top;
int s[100];

int main(){
  int a,b;
  char t[8];

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

void push(int x){
  top++;
  s[top]=x;
}
 
int pop(){
  if(top < 0)return 0;
  else top--;
  return s[top+1];
}

Compiler output:
main.c: In function 'main':
main.c:9:10: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    9 |   while( scanf("%s", t) != EOF ){
      |          ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int pop();
main.c:9:10: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    9 |   while( scanf("%s", t) != EOF ){
      |          ^~~~~
main.c:9:10: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:9:28: error: 'EOF' undeclared (first use in this function)
    9 |   while( scanf("%s", t) != EOF ){
      |                            ^~~
main.c:9:28: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:9:28: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:7: error: implicit declaration of function 'push' [-Wimplicit-function-declaration]
   13 |       push(a+b);
      |       ^~~~
main.c:26:12: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
   26 |       push(atoi(t));
      |            ^~~~
main.c:29:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   29 |   printf("%d\n",pop());
      |   ^~~~~~
main.c:29:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:29:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:29:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c: At top level:
main.c:33:6: warning: conflicting types for 'push'; have 'void(int)'
   33 | void push(int x){
      |      ^~~~
main.c:13:7: note: previous implicit declaration of 'push' with type 'void(int)'
   13 |       push(a+b);
      |       ^~~~
Language: C


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

Compiler output:
main.c:3:5: error: expected identifier or '(' before '}' token
    3 |     }
      |     ^
main.c:4:3: error: expected identifier or '(' before '}' token
    4 |   }
      |   ^
main.c:5:10: error: expected declaration specifiers or '...' before string constant
    5 |   printf(" %d\n",pop());
      |          ^~~~~~~
main.c:5:18: error: unknown type name 'pop'
    5 |   printf(" %d\n",pop());
      |                  ^~~
main.c:6:1: error: expected identifier or '(' before '}' token
    6 | }
      | ^
Language: C

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

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

int top=0,s[100];

int main(){
  int t1,t2;
  char c[10];

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

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

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

int pop(){
  if(isEmpty()){
    fprintf(stderr,"underflow\n");
    exit(1);
  }
  else {
    top--;
    return s[top+1];
  }
}

Compiler output:
main.c: In function 'main':
main.c:21:12: error: 'res' undeclared (first use in this function)
   21 |       push(res);
      |            ^~~
main.c:21:12: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

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

int top=0;

int main(){
  int s[100],t1,t2;
  char c[10];

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

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

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

int pop(int* s){
  if(isEmpty()){
    fprintf(stderr,"underflow\n");
    exit(1);
  }
  else {
    top--;
    return s[top+1];
  }
}

Compiler output:
main.c: In function 'main':
main.c:21:14: error: 'res' undeclared (first use in this function)
   21 |       push(s,res);
      |              ^~~
main.c:21:14: 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>

#define MAX 1000
??
int S[MAX];
int top;

void initialize(void);
int isEmpty(void);
int isFull(void);
void push(int);
int pop(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(a - b);
    }
    else if ( s[0] == '*' )
    {
      a = pop();
      b = pop();
      push(a * b);
    }
    else
    {
      x = atoi(s);
      push(x);
    }
  }

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

  return 0;
}

void initialize()
{
  top = 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() == 1)
  {
????????fprintf(stderr,"??¨?????????????????????????????????\n");
????????exit(1);
????}
????S[++top]=x;
}

int pop()
{
  if(isEmpty() == 1)
  {
????????fprintf(stderr,"??¨???????????¢?????????????????????\n");
????????exit(1);
????}
??
????else
  {
  top--;
????return S[top+1];
  }
}

Compiler output:
main.c:6:1: error: expected identifier or '(' before '?' token
    6 | ??
      | ^
main.c: In function 'main':
main.c:48:17: error: 'S' undeclared (first use in this function)
   48 |   printf("%d\n",S[1]);
      |                 ^
main.c:48:17: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'isFull':
main.c:67:1: error: expected expression before '?' token
   67 | ????else return 0;
      | ^
main.c: In function 'push':
main.c:74:1: error: expected expression before '?' token
   74 | ????????fprintf(stderr,"??¨?????????????????????????????????\n");
      | ^
main.c:75:1: error: expected expression before '?' token
   75 | ????????exit(1);
      | ^
main.c:76:1: error: expected expression before '?' token
   76 | ????}
      | ^
main.c:77:1: error: expected expression before '?' token
   77 | ????S[++top]=x;
      | ^
main.c:77:5: error: 'S' undeclared (first use in this function)
   77 | ????S[++top]=x;
      |     ^
main.c: In function 'pop':
main.c:84:1: error: expected expression before '?' token
   84 | ????????fprintf(stderr,"??¨???????????¢?????????????????????\n");
      | ^
main.c:85:1: error: expected expression before '?' token
   85 | ????????exit(1);
      | ^
main.c:86:1: error: expected expression before '?' token
   86 | ????}
      | ^
main.c:87:1: error: expected expression before '?' token
   87 | ??
      | ^
Language: C

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

#define N 199
#define M 100

int push(int);
int pop(int);
  int topa = 0, topb = 0;

int main(){
  int x,y;
  char S[N];
  int A[M];


  while(scanf("%s",S) != EOF){
    if(S[topa] == '+'){
      x=pop(A[topb]);
      y=pop(A[topb]);
      A[topb]=push(y+x);
    }
     else if(S[topa] == '-'){
      x=pop(A[topb]);
      y=pop(A[topb]);
      A[topb]=push(y-x);
    }
     else if(S[topa] == '*'){
      x=pop(A[topb]);
      y=pop(A[topb]);
      A[topb]=push(y*x);
    }
     else{
       A[topb] = push(atoi(&S[topb]));
     }

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

#include <stdio.h>

int isempty();
void push(int *,int);
int pop(int *);
int top=0;

int main(){

  int S[100];
  int x;
  int i;
  int b,a;

  for(i=0;i<100;i++){
    if((scanf("%d",&x))==EOF) break;
    if(x=='+' || x=='-' || x=='*'){
      
      
      b=pop(S)
      if(x=='+'){
	b=b+pop(S);
	
      }
      else if(x=='-'){
	b=pop(S)-b;
      }
      else b=b*pop(S);
      
      
      push(S,b);
	  
    }

    push(S,x);
  }
  
  
  a=pop(S);
  printf("%d\n",a);

  return 0;
}

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

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

int pop(int *S){
  int b;
  if(isempty(S)==1) {
    printf("underflow\n");
  }
  else{
    top=top-1;
    b=S[top+1];
    return b;
  }
}
  

Compiler output:
main.c: In function 'main':
main.c:20:15: error: expected ';' before 'if'
   20 |       b=pop(S)
      |               ^
      |               ;
   21 |       if(x=='+'){
      |       ~~
Language: C

#include<string.h>

void push(int);
int pop();

int sum[1000];
int top;

int main(){
  int x;
  int top=0;
  int po1,po2;
  char s[100];

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

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

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

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

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int top,s[100];
void push(int x){
  S[++top]=x;
}
int pop(){
  top--;
  returns[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:6:3: error: 'S' undeclared (first use in this function)
    6 |   S[++top]=x;
      |   ^
main.c:6:3: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'pop':
main.c:10:3: error: 'returns' undeclared (first use in this function)
   10 |   returns[top+1];
      |   ^~~~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int top,s[100];
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: In function 'push':
main.c:6:3: error: 'S' undeclared (first use in this function)
    6 |   S[++top]=x;
      |   ^
main.c:6:3: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'pop':
main.c:10:10: error: 'S' undeclared (first use in this function)
   10 |   return S[top+1];
      |          ^
Language: C

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

int pop(void);
void push(int);

int top,S[100];

int main(){
  int x;
  char s[100];
  int a,b;
  
  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",pop());
  
  return 0;
}
int pop(void){
    top--;
  return S[top+1];
  }
}
void push(int x){
    top++;
    S[top]=x;
    }
}

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

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

int Pop(void);
void Push(int);

int prin = 0;
int stack[100];

int main()
{

int i,j,x;
char s[100];

while(1){
if(scanf("%s",s) == EOF)
break;

if(s[0] == '+')
i = Pop();
j = Pop();
Push(j + i);
}
else if(s[0] == '-')
{
i = Pop();
j = Pop();
Push(j - i);
}
else if(s[0] == '*')
{
i = Pop();
j = Pop();
Push(j * i);
}
else{
x = atoi(s);
Push(x);
}
}
printf("%d\n",stack[prin];
return 0;
}

int Pop(void)
{
prin --;
return stack[prin + 1];
}

void Push(int x)
{
stack[++ prin] = x;
}

Compiler output:
main.c: In function 'main':
main.c:26:1: error: 'else' without a previous 'if'
   26 | else if(s[0] == '-')
      | ^~~~
main.c: At top level:
main.c:43:8: error: expected declaration specifiers or '...' before string constant
   43 | printf("%d\n",stack[prin];
      |        ^~~~~~
main.c:43:15: error: expected declaration specifiers or '...' before 'stack'
   43 | printf("%d\n",stack[prin];
      |               ^~~~~
main.c:44:1: error: expected declaration specifiers or '...' before 'return'
   44 | return 0;
      | ^~~~~~
main.c:45:1: error: expected declaration specifiers or '...' before '}' token
   45 | }
      | ^
main.c:45:1: error: expected ';', ',' or ')' before '}' token
Language: C

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

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

Compiler output:
main.c:1:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before '==' token
    1 | s[0] == '-' ){
      |      ^~
main.c:5:7: error: expected identifier or '(' before 'else'
    5 |     } else if ( s[0] == '*' ){
      |       ^~~~
main.c:10:3: error: expected identifier or '(' before '}' token
   10 |   }
      |   ^
main.c:11:10: error: expected declaration specifiers or '...' before string constant
   11 |   printf("%d\n",n[top]);
      |          ^~~~~~
main.c:11:17: error: unknown type name 'n'
   11 |   printf("%d\n",n[top]);
      |                 ^
main.c:12:3: error: expected identifier or '(' before 'return'
   12 |   return 0;
      |   ^~~~~~
main.c:13:1: error: expected identifier or '(' before '}' token
   13 | }
      | ^
main.c: In function 'push':
main.c:16:3: error: 'top' undeclared (first use in this function)
   16 |   top++;
      |   ^~~
main.c:16:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:3: error: 'n' undeclared (first use in this function)
   17 |   n[top]=x;
      |   ^
main.c: In function 'pop':
main.c:19:1: error: expected declaration or statement at end of input
   19 | int pop(){
      | ^~~
Language: C

#include<stdio.h>
#include<string.h>
#define LEN 100005

typedef struct pp{
  char name[100];
  int t;
}P;

P Q[LEN+1];
int head, tail, n;

void enqueue(P);
P dequeue(void);
int min(int,int);


int main(){
  int elaps = 0, c;
  int i, q,n,s;
  P u;
  scanf("%d %d", &n, &q);

  for ( i = 1; i <= n; i++){
    scanf("%s", Q[i].name);
    scanf("%d", &Q[i].t);
  }
  head=1;
  tail=n+1;

  while(head!=tail)
    {
      u = dequeue();
      s = min(q,u.t);
      u.t -=  s;
      elaps += s;
      if(u.t <= 0){
	printf("%s %d \n",u.name ,elaps);
      }
      else {
	enqueue(u);
      }
    }
  prointf("\n");
  
  return 0;
}

void enqueue(P x){
  Q[tail] = x;
  
  tail =(tail+1)%LEN;
}



P dequeue(){
  P x;
  x = Q[head];
  head = (head+1)%LEN;
  
    return x;
}

int min(int a,int b)
{
  if(a < b)return a; 
  else return b;
}

Compiler output:
main.c: In function 'main':
main.c:44:3: error: implicit declaration of function 'prointf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   44 |   prointf("\n");
      |   ^~~~~~~
      |   printf
Language: C

    }
    else{
      S.num[top] = atoi(c);
      top++;
    }
  }
  printf("%d\n",sum[sep]);
  return 0;
}

int Sum(a S,char c){
  int i, sum = 0;
  switch(c){
  case 42:
    sum = 1;
    for(i = 0; i < top; i++) sum *= S.num[i];
    return sum;
  case 43:
    for(i = 0; i < top; i++) sum += S.num[i];
    return sum;
  case 45:
    sum = S.num[0];
    for(i = 1; i < top; i++) sum -= S.num[i];
    return sum;
  }
}

Compiler output:
main.c:1:5: error: expected identifier or '(' before '}' token
    1 |     }
      |     ^
main.c:2:5: error: expected identifier or '(' before 'else'
    2 |     else{
      |     ^~~~
main.c:6:3: error: expected identifier or '(' before '}' token
    6 |   }
      |   ^
main.c:7:10: error: expected declaration specifiers or '...' before string constant
    7 |   printf("%d\n",sum[sep]);
      |          ^~~~~~
main.c:7:17: error: unknown type name 'sum'
    7 |   printf("%d\n",sum[sep]);
      |                 ^~~
main.c:8:3: error: expected identifier or '(' before 'return'
    8 |   return 0;
      |   ^~~~~~
main.c:9:1: error: expected identifier or '(' before '}' token
    9 | }
      | ^
main.c:11:9: error: unknown type name 'a'
   11 | int Sum(a S,char c){
      |         ^
Language: C

#include <stdio.h>

int top, N[1000];

int pop(void);
void push(int);

int main()
{
  
  int a,b;
  char n[100];
  top = 0;
  
  while(scanf("%s",n) != EOF) {
    switch(n[0]) {
    case '+':
      a=pop();
      b=pop();
      push(a+b);
      break;

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

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

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

void push(int a)
{
  N[++top] = a;
}

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

Compiler output:
main.c: In function 'main':
main.c:29:13: error: expected ':' or '...' before ';' token
   29 |     case '*';
      |             ^
main.c:36:12: error: passing argument 1 of 'push' makes integer from pointer without a cast [-Wint-conversion]
   36 |       push(n);
      |            ^
      |            |
      |            char *
main.c:6:11: note: expected 'int' but argument is of type 'char *'
    6 | void push(int);
      |           ^~~
main.c:52:1: error: expected declaration or statement at end of input
   52 | }
      | ^
Language: C


   while(1){
     
     c = getchar(); 
     
     if(c>='0' && c<='9'){
       num[i] = c - 48;
        i++;
	//  printf("%d\n",i);
     }
     else if(c == ' ' && i>0){
      
       if(i > 1){
	 
       for(j = 0; j < i-1; j++){
	 n = num[j]*10;
	 for(k=i-j-2;k > 0 ;k--){

	   n = n*10;
	   //  printf("%d\n",n);
	 }// printf("%d\n",n);
	 stack[max]+=n;
	 
       }
       }
       stack[max]+=num[i-1];
     
       // printf("%d\n",stack[max]);   
       i=0;
       max++;
     }
     else if (c == '+'){
       calStack = stack[max - 1] + stack[max - 2];
       stack[max-1]=0;
       stack[max-2]=calStack;
       max--;
     }
     
     else if (c == '-'){
       calStack = stack[max - 1] - stack[max - 2];
       stack[max-1]=0;
       stack[max-2]=calStack;
       max--;
     }
     
     else if (c == '*'){
       calStack = stack[max - 1] * stack[max - 2];
       stack[max-1]=0;
       stack[max-2]=calStack;
       max--;
    }
     else if(c=='\n'){
       break;
     }

   }
     printf("%d\n",stack[max-1]);
    
     
   return 0;
 
     
}

Compiler output:
main.c:2:4: error: expected identifier or '(' before 'while'
    2 |    while(1){
      |    ^~~~~
main.c:57:13: error: expected declaration specifiers or '...' before string constant
   57 |      printf("%d\n",stack[max-1]);
      |             ^~~~~~
main.c:57:20: error: unknown type name 'stack'
   57 |      printf("%d\n",stack[max-1]);
      |                    ^~~~~
main.c:60:4: error: expected identifier or '(' before 'return'
   60 |    return 0;
      |    ^~~~~~
main.c:63:1: error: expected identifier or '(' before '}' token
   63 | }
      | ^
Language: C

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

#include "problems.h"

struct stack_tag {
  int32_t *data;
  size_t max_len;
  size_t size;
};

static bool check_is_null(const void *const p)
{
  if (p == NULL) {
    return true;
  }

  return false;
}

stack_t *stack_create(const size_t len)
{
  int32_t *data = (int32_t *)malloc(sizeof(int32_t) * len);
  stack_t *stack = (stack_t *)malloc(sizeof(stack_t));

  if (check_is_null(data) || check_is_null(stack)) {
    perror("memory is full\n");
    exit(1);
  }

  stack->data = data;
  stack->size = 0;
  stack->max_len = len;
  return stack;
}

void stack_destroy(stack_t *const stack)
{
  if (stack != NULL) {
    free(stack->data);
    free(stack);
  }
}

size_t stack_get_size(const stack_t *const stack)
{
  if (check_is_null(stack)) {
    return 0;
  }

  return stack->size;
}

bool stack_push(stack_t *const stack, const int32_t data)
{
  if (check_is_null(stack)) {
    return false;
  }

  if (stack->max_len <= stack->size) {
    return false;
  }

  stack->data[stack->size] = data;
  stack->size++;
  return true;
}

bool stack_pop(stack_t *const stack, int32_t *const data)
{
  if (check_is_null(stack)) {
    return false;
  }

  if (stack->size < 1) {
    return false;
  }

  stack->size--;
  *data = stack->data[stack->size];

  return true;
}

#if !defined(TEST)
#define STACK_SIZE 256
#define BUF_SIZE 128

static int32_t stack_pop_with_check(stack_t *const stack)
{
  int32_t data;
  bool ret = stack_pop(stack, &data);
  if (!ret) {
    perror("stack is full");
    exit(1);
  }

  return data;
}

static int32_t stack_push_with_check(stack_t *const stack, int32_t data)
{
  bool ret = stack_push(stack, data);
  if (!ret) {
    perror("stack is full\n");
    exit(1);
  }

  return data;
}

int32_t main(void)
{
  char str[BUF_SIZE];

  stack_t *s = stack_create(STACK_SIZE);

  while (scanf("%s", str)) {
    if (str[0] == '-') {
      int32_t a = stack_pop_with_check(s);
      int32_t b = stack_pop_with_check(s);
      stack_push_with_check(s, a - b);
    } else if (str[0] == '+') {
      int32_t a = stack_pop_with_check(s);
      int32_t b = stack_pop_with_check(s);
      stack_push_with_check(s, a + b);
    } else if (str[0] == '*') {
      int32_t a = stack_pop_with_check(s);
      int32_t b = stack_pop_with_check(s);
      stack_push_with_check(s, a * b);
    } else {
      bool ret = stack_push(s, atoi(str));
      if (!ret) goto err;
    }
  }

  stack_destroy(s);

  return 0;

err:
  perror("stack is full\n");
  exit(1);
}
#endif

Compiler output:
main.c:5:10: fatal error: problems.h: No such file or directory
    5 | #include "problems.h"
      |          ^~~~~~~~~~~~
compilation terminated.
Language: C

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

Compiler output:
main.c:4:1: error: expected identifier or '(' before '?' token
    4 | ??
      | ^
main.c:7:1: error: expected identifier or '(' before '?' token
    7 | ??
      | ^
main.c:13:1: error: expected identifier or '(' before '?' token
   13 | ??
      | ^
main.c:19:1: error: expected identifier or '(' before '?' token
   19 | ??
      | ^
Language: C

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


int main(){
????int cal[100], top = 0;
????char s[1000000];

????while(1){

????????if(scanf("%s",&s) == EOF) break; 

????????if(s[0] == '+'){
????????????cal[top-1] = cal[top-1] + cal[top];
????????????top--;
????????}
??
????????else if(s[0] == '-'){
????????????cal[top-1] = cal[top-1] - cal[top];
????????????top--;
????????}

????????else if(s[0] == '*'){
????????????cal[top-1] = cal[top-1] * cal[top];
????????????top--;
????????}

????????else cal[++top] = atoi(s);
????}
????????
????printf("%d\n",cal[top]);
????
????return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:1: error: expected expression before '?' token
    6 | ????int cal[100], top = 0;
      | ^
main.c:7:1: error: expected expression before '?' token
    7 | ????char s[1000000];
      | ^
main.c:9:1: error: expected expression before '?' token
    9 | ????while(1){
      | ^
main.c:32:1: error: expected expression before '?' token
   32 | ????
      | ^
Language: C

#include <stdio.h>
#include <stdlib.h>
int main(){
int cal[100], top = 0;
char s[1000000];
while(1){
if(scanf("%s",&s) == EOF) break; 
if(s[0] == '+'){
cal[top-1] = cal[top-1] + cal[top];
top--;
????????}
????????else if(s[0] == '-'){
cal[top-1] = cal[top-1] - cal[top];
top--;
????????}
else if(s[0] == '*'){
cal[top-1] = cal[top-1] * cal[top];
top--;
????????}

????????else cal[++top] = atoi(s);
????}
????????
????printf("%d\n",cal[top]);
????
????return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:1: error: expected expression before '?' token
   11 | ????????}
      | ^
main.c:12:1: error: expected expression before '?' token
   12 | ????????else if(s[0] == '-'){
      | ^
main.c:22:1: error: expected expression before '?' token
   22 | ????}
      | ^
main.c:23:1: error: expected expression before '?' token
   23 | ????????
      | ^
main.c:25:1: error: expected expression before '?' token
   25 | ????
      | ^
Language: C

#include<stdio.h>
#include<stdkib.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:2:9: fatal error: stdkib.h: No such file or directory
    2 | #include<stdkib.h>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

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

int top,S[1000];

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

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

int main()
{
	int a,b;
	char s[100];
	
	top = 0;
	
	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: In function 'pop':
main.c:15:17: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   15 |         return S[top+1];
      |                ~^~~~~~~
main.c:12:6: note: declared here
   12 | void pop()
      |      ^~~
main.c: In function 'main':
main.c:29:27: error: void value not ignored as it ought to be
   29 |                         a = pop();
      |                           ^
main.c:30:27: error: void value not ignored as it ought to be
   30 |                         b = pop();
      |                           ^
main.c:35:27: error: void value not ignored as it ought to be
   35 |                         a = pop();
      |                           ^
main.c:36:27: error: void value not ignored as it ought to be
   36 |                         b = pop();
      |                           ^
main.c:41:27: error: void value not ignored as it ought to be
   41 |                         a = pop();
      |                           ^
main.c:42:27: error: void value not ignored as it ought to be
   42 |                         b = pop();
      |                           ^
main.c:51:23: error: invalid use of void expression
   51 |         printf("%d\n",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;
	char s[100];
	top=0;
	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(atio(s));
		}
	}
	
	printf("%d\n",pop());
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:34:30: error: implicit declaration of function 'atio'; did you mean 'atoi'? [-Wimplicit-function-declaration]
   34 |                         push(atio(s));
      |                              ^~~~
      |                              atoi
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(atio(s));
		}
	}
	
	printf("%d\n",pop());
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:34:30: error: implicit declaration of function 'atio'; did you mean 'atoi'? [-Wimplicit-function-declaration]
   34 |                         push(atio(s));
      |                              ^~~~
      |                              atoi
Language: C

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

int top,S[1000];
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] == '+'){
			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:41:9: error: expected declaration or statement at end of input
   41 |         return 0;
      |         ^~~~~~
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;
	char s[100;]
	top=0;
	
	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 'main':
main.c:18:19: error: expected ']' before ';' token
   18 |         char s[100;]
      |                   ^
      |                   ]
main.c:21:26: error: 's' undeclared (first use in this function)
   21 |         while(scanf("%s",s)!=EOF){
      |                          ^
main.c:21:26: note: each undeclared identifier is reported only once for each function it appears in
main.c:31:26: error: assignment to 'int' from 'int (*)()' makes integer from pointer without a cast [-Wint-conversion]
   31 |                         a=pop;
      |                          ^
main.c:32:26: error: assignment to 'int' from 'int (*)()' makes integer from pointer without a cast [-Wint-conversion]
   32 |                         b=pop;
      |                          ^
Language: C

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

int top, S[1000];

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

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

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

	while (scanf("%s", s) != EOF) {
		if (s[0] == '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));//????????????int????????°????????????
		}
	}

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

	return 0;
}

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

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

#define MAX 1000
int top,S[1000];

initialize()
{
	top=0;
}
isEmpty()
{
	return top == 0;
}
isFull()
{
	return top >= MAX-1;
}
int push(int x)
{
	int x;
	S[++top] = x;

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

int main()
{
	int i,a,b;
	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(i));
		}
	}
	
	printf("%d\n",pop());
	
	return 0;
}

Compiler output:
main.c:8:1: error: return type defaults to 'int' [-Wimplicit-int]
    8 | initialize()
      | ^~~~~~~~~~
main.c:12:1: error: return type defaults to 'int' [-Wimplicit-int]
   12 | isEmpty()
      | ^~~~~~~
main.c:16:1: error: return type defaults to 'int' [-Wimplicit-int]
   16 | isFull()
      | ^~~~~~
main.c: In function 'push':
main.c:22:13: error: 'x' redeclared as different kind of symbol
   22 |         int x;
      |             ^
main.c:20:14: note: previous definition of 'x' with type 'int'
   20 | int push(int x)
      |          ~~~~^
main.c: In function 'pop':
main.c:29:17: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   29 |         return S[top+1]
      |                ~^~~~~~~
main.c:26:6: note: declared here
   26 | void pop()
      |      ^~~
main.c:29:24: error: expected ';' before '}' token
   29 |         return S[top+1]
      |                        ^
      |                        ;
   30 | }
      | ~                       
main.c: In function 'main':
main.c:40:26: error: void value not ignored as it ought to be
   40 |                         a= pop();
      |                          ^
main.c:41:26: error: void value not ignored as it ought to be
   41 |                         b= pop();
      |                          ^
main.c:46:26: error: void value not ignored as it ought to be
   46 |                         a= pop();
      |                          ^
main.c:47:26: error: void value not ignored as it ought to be
   47 |                         b= pop();
      |                          ^
main.c:52:26: error: void value not ignored as it ought to be
   52 |                         a= pop();
      |                          ^
main.c:53:26: error: void value not ignored as it ought to be
   53 |                         b= pop();
      |                          ^
main.c:58:35: error: passing argument 1 of 'atoi' makes pointer from integer without a cast [-Wint-conversion]
   58 |                         push(atoi(i));
      |                                   ^
      |                                   |
      |                                   int
In file included from main.c:2:
/usr/include/stdlib.h:105:30: note: expected 'const char *' but argument is of type 'int'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
main.c:62:23: error: invalid use of void expression
   62 |         printf("%d\n",pop());
      |                       ^~~~~
Language: C

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

int main(void) {

	char siki[200];
	int kazu[200], i = 0;

	while (scanf_s("%s", siki) != EOF) {
		switch (siki[0]) {
		case '+':
			kazu[i - 2] += kazu[i - 1];
			i--;
			break;
		case '-':
			kazu[i - 2] -= kazu[i - 1];
			i--;
			break;
		case '*':
			kazu[i - 2] *= kazu[i - 1];
			i--;
			break;
		default:
			kazu[i] = atoi(siki);
			i++;
			break;
		}
	}

	printf("%c\n", siki[0]);
	scanf_s("%s", siki);
	return 0;
}

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

#include <stdio.h>
#include <stdlib.h>
  
void push(int x){
  t++;
  c[t]=x;  
}
int pop(){
  t--;
  return c[t+1];
}

int pop();
  
int t=0,c[100];
  
int main(){  
  int a,b;
  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:5:3: error: 't' undeclared (first use in this function)
    5 |   t++;
      |   ^
main.c:5:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:3: error: 'c' undeclared (first use in this function)
    6 |   c[t]=x;
      |   ^
main.c: In function 'pop':
main.c:9:3: error: 't' undeclared (first use in this function)
    9 |   t--;
      |   ^
main.c:10:10: error: 'c' undeclared (first use in this function)
   10 |   return c[t+1];
      |          ^
Language: C

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

#define MAX 101
void initialize(void);
void push(int);
void pop(void);
int isEmpty(void);
int isFull(void);
int S[MAX]
int top;

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


void initialize(){
	top = 0;
}

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

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

void push(int x){
	if(isFull()==1){
		printf("error overfllow\n");
	}
	else 
	{
		top++;
		S[top] = x;
	}
}

int pop(){
	if(isEmpty()==1){
		printf("error underflow\n");
	}
	else
	{
		top--;
		return S[top+1];
	}
}

Compiler output:
main.c:11:11: error: expected ';' before 'int'
   11 | int S[MAX]
      |           ^
      |           ;
   12 | int top;
      | ~~~        
main.c: In function 'main':
main.c:21:27: error: void value not ignored as it ought to be
   21 |                         y = pop();
      |                           ^
main.c:22:27: error: void value not ignored as it ought to be
   22 |                         x = pop();
      |                           ^
main.c:27:26: error: void value not ignored as it ought to be
   27 |                         y= pop();
      |                          ^
main.c:28:27: error: void value not ignored as it ought to be
   28 |                         x = pop();
      |                           ^
main.c:32:26: error: void value not ignored as it ought to be
   32 |                         y=pop();
      |                          ^
main.c:33:26: error: void value not ignored as it ought to be
   33 |                         x=pop();
      |                          ^
main.c:41:23: error: 'S' undeclared (first use in this function)
   41 |         printf("%d\n",S[top]);
      |                       ^
main.c:41:23: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'push':
main.c:66:17: error: 'S' undeclared (first use in this function)
   66 |                 S[top] = x;
      |                 ^
main.c: At top level:
main.c:70:5: error: conflicting types for 'pop'; have 'int()'
   70 | int pop(){
      |     ^~~
main.c:8:6: note: previous declaration of 'pop' with type 'void(void)'
    8 | void pop(void);
      |      ^~~
main.c: In function 'pop':
main.c:77:24: error: 'S' undeclared (first use in this function)
   77 |                 return S[top+1];
      |                        ^
Language: C

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

#define MAX 101
void initialize(void);
void push(int);
void pop(void);
int isEmpty(void);
int isFull(void);
int S[MAX];
int top;

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


void initialize(){
	top = 0;
}

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

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

void push(int x){
	if(isFull()==1){
		printf("error overfllow\n");
	}
	else 
	{
		top++;
		S[top] = x;
	}
}

int pop(){
	if(isEmpty()==1){
		printf("error underflow\n");
	}
	else
	{
		top--;
		return S[top+1];
	}
}

Compiler output:
main.c: In function 'main':
main.c:21:27: error: void value not ignored as it ought to be
   21 |                         y = pop();
      |                           ^
main.c:22:27: error: void value not ignored as it ought to be
   22 |                         x = pop();
      |                           ^
main.c:27:26: error: void value not ignored as it ought to be
   27 |                         y= pop();
      |                          ^
main.c:28:27: error: void value not ignored as it ought to be
   28 |                         x = pop();
      |                           ^
main.c:32:26: error: void value not ignored as it ought to be
   32 |                         y=pop();
      |                          ^
main.c:33:26: error: void value not ignored as it ought to be
   33 |                         x=pop();
      |                          ^
main.c: At top level:
main.c:70:5: error: conflicting types for 'pop'; have 'int()'
   70 | int pop(){
      |     ^~~
main.c:8:6: note: previous declaration of 'pop' with type 'void(void)'
    8 | void pop(void);
      |      ^~~