Language: C

#include <stdio.h>
#include <string.h>
#define N 100
int up(int A);
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);
	if(ans==1)
		printf("o\n");
	else if(ans==0)
		printf("x\n");
	else
		printf("d\n");
	}
	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;
	}		
}

Compiler output:
main.c: In function 'main':
main.c:19:24: error: passing argument 1 of 'up' makes integer from pointer without a cast [-Wint-conversion]
   19 |                 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:33:21: error: subscripted value is neither array nor pointer nor vector
   33 |                 if(A[i]==A[i+1] && A[i+1]==A[i+2] && A[i]!=5){
      |                     ^
main.c:33:27: error: subscripted value is neither array nor pointer nor vector
   33 |                 if(A[i]==A[i+1] && A[i+1]==A[i+2] && A[i]!=5){
      |                           ^
main.c:33:37: error: subscripted value is neither array nor pointer nor vector
   33 |                 if(A[i]==A[i+1] && A[i+1]==A[i+2] && A[i]!=5){
      |                                     ^
main.c:33:45: error: subscripted value is neither array nor pointer nor vector
   33 |                 if(A[i]==A[i+1] && A[i+1]==A[i+2] && A[i]!=5){
      |                                             ^
main.c:33:55: error: subscripted value is neither array nor pointer nor vector
   33 |                 if(A[i]==A[i+1] && A[i+1]==A[i+2] && A[i]!=5){
      |                                                       ^
main.c:34:30: error: subscripted value is neither array nor pointer nor vector
   34 |                         ans=A[i];
      |                              ^
main.c:39:21: error: subscripted value is neither array nor pointer nor vector
   39 |                 if(A[i]==A[i+3] && A[i+3]==A[i+6] && A[i]!=5){
      |                     ^
main.c:39:27: error: subscripted value is neither array nor pointer nor vector
   39 |                 if(A[i]==A[i+3] && A[i+3]==A[i+6] && A[i]!=5){
      |                           ^
main.c:39:37: error: subscripted value is neither array nor pointer nor vector
   39 |                 if(A[i]==A[i+3] && A[i+3]==A[i+6] && A[i]!=5){
      |                                     ^
main.c:39:45: error: subscripted value is neither array nor pointer nor vector
   39 |                 if(A[i]==A[i+3] && A[i+3]==A[i+6] && A[i]!=5){
      |                                             ^
main.c:39:55: error: subscripted value is neither array nor pointer nor vector
   39 |                 if(A[i]==A[i+3] && A[i+3]==A[i+6] && A[i]!=5){
      |                                                       ^
main.c:40:30: error: subscripted value is neither array nor pointer nor vector
   40 |                         ans=A[i];
      |                              ^
main.c:44:13: error: subscripted value is neither array nor pointer nor vector
   44 |         if(A[1]==A[5] && A[5]==A[9] && A[1]!=5){
      |             ^
main.c:44:19: error: subscripted value is neither array nor pointer nor vector
   44 |         if(A[1]==A[5] && A[5]==A[9] && A[1]!=5){
      |                   ^
main.c:44:27: error: subscripted value is neither array nor pointer nor vector
   44 |         if(A[1]==A[5] && A[5]==A[9] && A[1]!=5){
      |                           ^
main.c:44:33: error: subscripted value is neither array nor pointer nor vector
   44 |         if(A[1]==A[5] && A[5]==A[9] && A[1]!=5){
      |                                 ^
main.c:44:41: error: subscripted value is neither array nor pointer nor vector
   44 |         if(A[1]==A[5] && A[5]==A[9] && A[1]!=5){
      |                                         ^
main.c:45:22: error: subscripted value is neither array nor pointer nor vector
   45 |                 ans=A[1];
      |                      ^
main.c:48:13: error: subscripted value is neither array nor pointer nor vector
   48 |         if(A[3]==A[5] && A[5]==A[7] && A[3]!=5){
      |             ^
main.c:48:19: error: subscripted value is neither array nor pointer nor vector
   48 |         if(A[3]==A[5] && A[5]==A[7] && A[3]!=5){
      |                   ^
main.c:48:27: error: subscripted value is neither array nor pointer nor vector
   48 |         if(A[3]==A[5] && A[5]==A[7] && A[3]!=5){
      |                           ^
main.c:48:33: error: subscripted value is neither array nor pointer nor vector
   48 |         if(A[3]==A[5] && A[5]==A[7] && A[3]!=5){
      |                                 ^
main.c:48:41: error: subscripted value is neither array nor pointer nor vector
   48 |         if(A[3]==A[5] && A[5]==A[7] && A[3]!=5){
      |                                         ^
main.c:49:22: error: subscripted value is neither array nor pointer nor vector
   49 |                 ans=A[3];
      |                      ^