Language: C

#include<stdio.h>

#define N 8
#define FREE -1
#define NOT_FREE 1

int row[N], col[N], dpos[2 * N - 1], dneg[2 * N - 1];

bool X[N][N];

void initialize(){
  int i;
  for(i = 0 ; i < N ; i++) {row[i] = FREE, col[i] = FREE;}
  for(i = 0 ; i < 2 * N ; i++) {dpos[i] = FREE, dneg[i]] = FREE;}
}

void printBoard(){
  int i, j;
  for(i = 0 ; i < N ; i++){
    for(j = 0 ; j < N ; j++){
      if(X[i][j]){
        if(row[i] != j) return;
      }
    }
  }
  for(i = 0 ; i < N ; i++){
for(j = 0 ; j < N ; j++){
      if(X[i][j]){
        if(row[i] != j) return;
      }
    }
  }
  for(i = 0 ; i < N ; i++){
    for(j = 0 ; j < N ; j++){
      printf("%d",((row[i] == j) ? "Q" : "."));
    }
    printf("\n");
  }
}

void recursive(int i){
  int j;
  if(i == N){
    printBoard();
    return;
  }
  for(j = 0 ; j < N ; j++){
    if(NOT_FREE == col[j] || NOT_FREE == dpos[i + j] || NOT_FREE == dneg[i - j + N - 1]) co\
ntinue;
    row[i] = j;
    col[j] = dpos[i + j] = dneg[i - j + N - 1] = NOT_FREE;
    recursive();
    row[i] = col[i] = dpos[i + j] = dneg[i - j + N - 1] = FREE;
  }
}

int main(){
  int i, j;
  initialize();

  for(i = 0 ; i < N ; i++){
    for(j = 0 ; j < N ; j++){      X[i][j] = false;
    }
  }
  int k;
  scanf("%d",&k);

  for(i = 0 ; i < N ; i++){
    int r, c;
    scanf("%d%d",&r,&c);
    X[r][c] = true;
  }
  recursive();

  return 0;
}

Compiler output:
main.c:9:1: error: unknown type name 'bool'
    9 | bool X[N][N];
      | ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c: In function 'initialize':
main.c:14:56: error: expected ';' before ']' token
   14 |   for(i = 0 ; i < 2 * N ; i++) {dpos[i] = FREE, dneg[i]] = FREE;}
      |                                                        ^
      |                                                        ;
main.c:14:56: error: expected statement before ']' token
main.c:14:58: error: expected expression before '=' token
   14 |   for(i = 0 ; i < 2 * N ; i++) {dpos[i] = FREE, dneg[i]] = FREE;}
      |                                                          ^
main.c: In function 'recursive':
main.c:52:5: error: too few arguments to function 'recursive'
   52 |     recursive();
      |     ^~~~~~~~~
main.c:41:6: note: declared here
   41 | void recursive(int i){
      |      ^~~~~~~~~
main.c: In function 'main':
main.c:62:46: error: 'false' undeclared (first use in this function)
   62 |     for(j = 0 ; j < N ; j++){      X[i][j] = false;
      |                                              ^~~~~
main.c:62:46: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:62:46: note: each undeclared identifier is reported only once for each function it appears in
main.c:71:15: error: 'true' undeclared (first use in this function)
   71 |     X[r][c] = true;
      |               ^~~~
main.c:71:15: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:73:3: error: too few arguments to function 'recursive'
   73 |   recursive();
      |   ^~~~~~~~~
main.c:41:6: note: declared here
   41 | void recursive(int i){
      |      ^~~~~~~~~