Language: C

#include <stdio.h>

int i,n,M[100][100];

int prim(int M){
  int u,v,mincost,sum,d[100][100],p[100][100],color[100][100];
  for(i=0;i<n;i++){
    color[i]=0;
    d[i]=(1<<21);
     p[i]=-1;
  }
  d[0]=0;

  while(1){
    mincost=(1<<21);
    for(i=;i<n;i++){
      if(color[i]!==0&&d[i]<mincost){
        mincost=d[i];
        u=i;
      }
    }
    if(mincost==(1<21)){
        break;
    }
    color[u]=0;
    for(v=0;v<n;v++){
      if(color[v]!=2;&&M[u][v]!=(1<<21)){
        if(M[u][v]<d[v]){
          d[v]=M[u][v];
          p[v]=u;
          color[v]=1;
        }
      }
    }
  }
  sum=0;
  for(i=0;i<n;i++){
    if(p[i]!=-1){
      sum+=M[i][p[i]];
    }
  }

  return sum;
}

int main(void){
  int e,j;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    for(j=0;j<n;j++){
     scanf("%d",&e);
     M[i][j]=(e==-1)?((1<<21):e);
    }
  }
  printf("%d\n",prim(M[i][j]));
  return 0;
}

Compiler output:
main.c: In function 'prim':
main.c:8:13: error: assignment to expression with array type
    8 |     color[i]=0;
      |             ^
main.c:9:9: error: assignment to expression with array type
    9 |     d[i]=(1<<21);
      |         ^
main.c:10:10: error: assignment to expression with array type
   10 |      p[i]=-1;
      |          ^
main.c:12:7: error: assignment to expression with array type
   12 |   d[0]=0;
      |       ^
main.c:16:11: error: expected expression before ';' token
   16 |     for(i=;i<n;i++){
      |           ^
main.c:17:20: error: expected expression before '=' token
   17 |       if(color[i]!==0&&d[i]<mincost){
      |                    ^
main.c:18:16: error: assignment to 'int' from 'int *' makes integer from pointer without a cast [-Wint-conversion]
   18 |         mincost=d[i];
      |                ^
main.c:25:13: error: assignment to expression with array type
   25 |     color[u]=0;
      |             ^
main.c:27:18: warning: comparison between pointer and integer
   27 |       if(color[v]!=2;&&M[u][v]!=(1<<21)){
      |                  ^~
main.c:27:21: error: expected ')' before ';' token
   27 |       if(color[v]!=2;&&M[u][v]!=(1<<21)){
      |         ~           ^
      |                     )
main.c:28:13: error: subscripted value is neither array nor pointer nor vector
   28 |         if(M[u][v]<d[v]){
      |             ^
main.c:29:17: error: subscripted value is neither array nor pointer nor vector
   29 |           d[v]=M[u][v];
      |                 ^
main.c:30:15: error: assignment to expression with array type
   30 |           p[v]=u;
      |               ^
main.c:31:19: error: assignment to expression with array type
   31 |           color[v]=1;
      |                   ^
main.c:38:12: warning: comparison between pointer and integer
   38 |     if(p[i]!=-1){
      |            ^~
main.c:39:13: error: subscripted value is neither array nor pointer nor vector
   39 |       sum+=M[i][p[i]];
      |             ^
main.c: In function 'main':
main.c:52:30: error: expected ')' before ':' token
   52 |      M[i][j]=(e==-1)?((1<<21):e);
      |                      ~       ^
      |                              )
main.c:52:33: error: expected ':' before ';' token
   52 |      M[i][j]=(e==-1)?((1<<21):e);
      |                                 ^
      |                                 :