Language: C

#include <stdio.h>

void selectionSort(A, N){                                                                                        
  int i, minj, j, t, c = 0;                                                                                 
  for(i = 0; i < N; i++){                                                                                   
    minj = i;                                                                                               
    for(j = i; j < N; j++){                                                                                 
      if(A[j] < A[minj]){                                                                                   
        minj = j;                                                                                           
      }                                                                                                     
    }                                                                                                       
    if(i != minj){                                                                                          
      t = A[i];                                                                                             
      A[i] = A[minj];                                                                                       
      A[minj] = t;                                                                                          
      c++;                                                                                                  
    }                                                                                                       
  }                                                                                                         
  for(i = 0; i < N; i++){                                                                                   
    printf("%d ",A[i]);                                                                                     
  }                                                                                                         
  printf("\n%d\n", c);                                                                                      
}

Compiler output:
main.c: In function 'selectionSort':
main.c:3:6: error: type of 'A' defaults to 'int' [-Wimplicit-int]
    3 | void selectionSort(A, N){
      |      ^~~~~~~~~~~~~
main.c:3:6: error: type of 'N' defaults to 'int' [-Wimplicit-int]
main.c:8:11: error: subscripted value is neither array nor pointer nor vector
    8 |       if(A[j] < A[minj]){
      |           ^
main.c:8:18: error: subscripted value is neither array nor pointer nor vector
    8 |       if(A[j] < A[minj]){
      |                  ^
main.c:13:12: error: subscripted value is neither array nor pointer nor vector
   13 |       t = A[i];
      |            ^
main.c:14:8: error: subscripted value is neither array nor pointer nor vector
   14 |       A[i] = A[minj];
      |        ^
main.c:14:15: error: subscripted value is neither array nor pointer nor vector
   14 |       A[i] = A[minj];
      |               ^
main.c:15:8: error: subscripted value is neither array nor pointer nor vector
   15 |       A[minj] = t;
      |        ^
main.c:20:19: error: subscripted value is neither array nor pointer nor vector
   20 |     printf("%d ",A[i]);
      |                   ^