Language: C

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

#define MAX 100
#define NUMBER '0'

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

int top;

int main(){

  int i,c,s,type;
  int count=0;
  int pop2;
  char S[MAX];

  initialize();
  /*
  for(i=0;i<MAX;i++){
    c = scanf("%c",S[i]);
    count++;
    if(c == EOF)break;
  }

  for(i=0;i<MAX;i++){
    s = atoi(S[i]);
    if(
  }
  */
  
  while((type = getop(S)) != EOF){
      
    pop2 = pop(); //??????push?????????
    
    switch (top) {
    case NUMBER:
      push(atoi(S));
      break;
      
    case '+':
      push(pop() + pop());
      break;
      
    case '*':
      push(pop() * pop());
      break;
      
    case '-':
      push(pop() - pop2);
      break;
      
    case '\n':
      printf("%d\n", pop());
      break;
      
    default:
      printf("error: unknown command %s\n", s);
      break;
    }
  }
  return 0;  char S[MAX];
}

void initialize(void){
  top = 0;    
}

int val[MAX];

void push(int x){
  if(isFull(top) == 1){
    printf("??¨?????????????????????????????????\n");
    exit(1);
  }
  top++;
  val[top] = x;
}

int pop(void){
  if(isEmpty(top) == 1){
    printf("??¨???????????¢?????????????????????\n");
    return 0;
  }    
  top--;
  return val[top+1];
}

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

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

#include <ctype.h>

int getch(void);
void ungetch(int);

/* getop:????¬???????????????????????????°???????¢?????????°?????¨??£?????????*/
int getop(char S[])
{
	int i, c;

	while ((S[0]= c = getch()) == ' ' || c == '\t')
		;
	s[1] = '\0';
	if (!isdigit(c) && c != '.')
		return c;	/*???c?????°??§????????? */
	i = 0;
	if (isdigit(c)) /*?????´??°??¨???????????????*/
		while (isdigit(S[++i] = c = getch()))
			;
	if (c == '.') /*????°???°??¨???????????????*/
		while (isdigit(S[++i] = c = getch()))
			;
	S[i] = '\0';
	if (c != EOF)
		ungetch(c);
	return NUMBER;
}

char buf[MAX];
int bufp =0;

int getch(void) /* 1??????????????£????????? */
{
	return (bufp > 0) ? buf[--bufp] : getchar();
}

void ungetch(int c) /* ???????????\???????????? */
{
	if (bufp >= MAX)
		printf("ungetch: too many characters\n");
	else
		buf[bufp++] = c;
}

Compiler output:
main.c: In function 'main':
main.c:36:17: error: implicit declaration of function 'getop' [-Wimplicit-function-declaration]
   36 |   while((type = getop(S)) != EOF){
      |                 ^~~~~
main.c:66:19: error: redeclaration of 'S' with no linkage
   66 |   return 0;  char S[MAX];
      |                   ^
main.c:20:8: note: previous declaration of 'S' with type 'char[100]'
   20 |   char S[MAX];
      |        ^
main.c: In function 'isEmpty':
main.c:93:5: error: type of 'top' defaults to 'int' [-Wimplicit-int]
   93 | int isEmpty(top){
      |     ^~~~~~~
main.c: In function 'isFull':
main.c:98:5: error: type of 'top' defaults to 'int' [-Wimplicit-int]
   98 | int isFull(top){
      |     ^~~~~~
main.c: In function 'getop':
main.c:115:9: error: 's' undeclared (first use in this function)
  115 |         s[1] = '\0';
      |         ^
main.c:115:9: note: each undeclared identifier is reported only once for each function it appears in