Language: C

#include <stdio.h>
#include <string.h>
#define N 100
int up(int A);
void down(int ans);
int main(void){
	int ans,i,A[N];
	char str[N];

	for( ;fgets(str,sizeof(str),stdin)!=NULL; ){
		ans=5;
		for(i=0;i<9;i++){
			if(str[i]=='o')
				A[i+1]=1;
			else if(str[i]=='x')
				A[i+1]=0;
			else if(str[i]=='s')
				A[i+1]=5;
		}
		ans=up(A);
		down(ans);
	}
	return 0;
}
 
int up(int A){
	int i,ans;
	for(i=1;i<8;i+=3){
		if(A[i]==A[i+1] && A[i+1]==A[i+2] && A[i]!=5){
			ans=A[i];
			return ans;
		}
	}
	for(i=1;i<4;i+=1){
		if(A[i]==A[i+3] && A[i+3]==A[i+6] && A[i]!=5){
			ans=A[i];
			return ans;
		}
	}
	if(A[1]==A[5] && A[5]==A[9] && A[1]!=5){
		ans=A[1];
		return ans;
	}
	if(A[3]==A[5] && A[5]==A[7] && A[3]!=5){
		ans=A[3];
		return ans;
	}		
}

void down(int ans){
	if(ans==1)
		printf("o\n");
	else if(ans==0)
		printf("x\n");
	else
		printf("d\n");
}

Compiler output:
main.c: In function 'main':
main.c:20:24: error: passing argument 1 of 'up' makes integer from pointer without a cast [-Wint-conversion]
   20 |                 ans=up(A);
      |                        ^
      |                        |
      |                        int *
main.c:4:12: note: expected 'int' but argument is of type 'int *'
    4 | int up(int A);
      |        ~~~~^
main.c: In function 'up':
main.c:29:21: error: subscripted value is neither array nor pointer nor vector
   29 |                 if(A[i]==A[i+1] && A[i+1]==A[i+2] && A[i]!=5){
      |                     ^
main.c:29:27: error: subscripted value is neither array nor pointer nor vector
   29 |                 if(A[i]==A[i+1] && A[i+1]==A[i+2] && A[i]!=5){
      |                           ^
main.c:29:37: error: subscripted value is neither array nor pointer nor vector
   29 |                 if(A[i]==A[i+1] && A[i+1]==A[i+2] && A[i]!=5){
      |                                     ^
main.c:29:45: error: subscripted value is neither array nor pointer nor vector
   29 |                 if(A[i]==A[i+1] && A[i+1]==A[i+2] && A[i]!=5){
      |                                             ^
main.c:29:55: error: subscripted value is neither array nor pointer nor vector
   29 |                 if(A[i]==A[i+1] && A[i+1]==A[i+2] && A[i]!=5){
      |                                                       ^
main.c:30:30: error: subscripted value is neither array nor pointer nor vector
   30 |                         ans=A[i];
      |                              ^
main.c:35:21: error: subscripted value is neither array nor pointer nor vector
   35 |                 if(A[i]==A[i+3] && A[i+3]==A[i+6] && A[i]!=5){
      |                     ^
main.c:35:27: error: subscripted value is neither array nor pointer nor vector
   35 |                 if(A[i]==A[i+3] && A[i+3]==A[i+6] && A[i]!=5){
      |                           ^
main.c:35:37: error: subscripted value is neither array nor pointer nor vector
   35 |                 if(A[i]==A[i+3] && A[i+3]==A[i+6] && A[i]!=5){
      |                                     ^
main.c:35:45: error: subscripted value is neither array nor pointer nor vector
   35 |                 if(A[i]==A[i+3] && A[i+3]==A[i+6] && A[i]!=5){
      |                                             ^
main.c:35:55: error: subscripted value is neither array nor pointer nor vector
   35 |                 if(A[i]==A[i+3] && A[i+3]==A[i+6] && A[i]!=5){
      |                                                       ^
main.c:36:30: error: subscripted value is neither array nor pointer nor vector
   36 |                         ans=A[i];
      |                              ^
main.c:40:13: error: subscripted value is neither array nor pointer nor vector
   40 |         if(A[1]==A[5] && A[5]==A[9] && A[1]!=5){
      |             ^
main.c:40:19: error: subscripted value is neither array nor pointer nor vector
   40 |         if(A[1]==A[5] && A[5]==A[9] && A[1]!=5){
      |                   ^
main.c:40:27: error: subscripted value is neither array nor pointer nor vector
   40 |         if(A[1]==A[5] && A[5]==A[9] && A[1]!=5){
      |                           ^
main.c:40:33: error: subscripted value is neither array nor pointer nor vector
   40 |         if(A[1]==A[5] && A[5]==A[9] && A[1]!=5){
      |                                 ^
main.c:40:41: error: subscripted value is neither array nor pointer nor vector
   40 |         if(A[1]==A[5] && A[5]==A[9] && A[1]!=5){
      |                                         ^
main.c:41:22: error: subscripted value is neither array nor pointer nor vector
   41 |                 ans=A[1];
      |                      ^
main.c:44:13: error: subscripted value is neither array nor pointer nor vector
   44 |         if(A[3]==A[5] && A[5]==A[7] && A[3]!=5){
      |             ^
main.c:44:19: error: subscripted value is neither array nor pointer nor vector
   44 |         if(A[3]==A[5] && A[5]==A[7] && A[3]!=5){
      |                   ^
main.c:44:27: error: subscripted value is neither array nor pointer nor vector
   44 |         if(A[3]==A[5] && A[5]==A[7] && A[3]!=5){
      |                           ^
main.c:44:33: error: subscripted value is neither array nor pointer nor vector
   44 |         if(A[3]==A[5] && A[5]==A[7] && A[3]!=5){
      |                                 ^
main.c:44:41: error: subscripted value is neither array nor pointer nor vector
   44 |         if(A[3]==A[5] && A[5]==A[7] && A[3]!=5){
      |                                         ^
main.c:45:22: error: subscripted value is neither array nor pointer nor vector
   45 |                 ans=A[3];
      |                      ^