Language: C

int main () {
  int a[20], n, q, m[200], i, j;

  scanf("%d", &n);
  for(i = 0 ; i < n ; i++) {
    scanf("%d", &a[i]);
  }

  i = 0;
  
  scanf("%d", &q);
  for(j = 0 ; j < q ; j++) {
    scanf("%d", &m[j]);
    printf("%s\n", solve(n,m[j]));
  }
  return 0;
}

char solve(int i, int m){
  char res[];
  if(m == 0) return "true";
  if(i >= n) return "false";

  if(solve(i+1,m) == "true" || solve(i+1,m[i]) == "true")

Compiler output:
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |   scanf("%d", &n);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main () {
main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |   scanf("%d", &n);
      |   ^~~~~
main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:14:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   14 |     printf("%s\n", solve(n,m[j]));
      |     ^~~~~~
main.c:14:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:14:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:20: error: implicit declaration of function 'solve' [-Wimplicit-function-declaration]
   14 |     printf("%s\n", solve(n,m[j]));
      |                    ^~~~~
main.c: At top level:
main.c:19:6: error: conflicting types for 'solve'; have 'char(int,  int)'
   19 | char solve(int i, int m){
      |      ^~~~~
main.c:14:20: note: previous implicit declaration of 'solve' with type 'int()'
   14 |     printf("%s\n", solve(n,m[j]));
      |                    ^~~~~
main.c: In function 'solve':
main.c:20:8: error: array size missing in 'res'
   20 |   char res[];
      |        ^~~
main.c:21:21: error: returning 'char *' from a function with return type 'char' makes integer from pointer without a cast [-Wint-conversion]
   21 |   if(m == 0) return "true";
      |                     ^~~~~~
main.c:22:11: error: 'n' undeclared (first use in this function)
   22 |   if(i >= n) return "false";
      |           ^
main.c:22:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:21: error: returning 'char *' from a function with return type 'char' makes integer from pointer without a cast [-Wint-conversion]
   22 |   if(i >= n) return "false";
      |                     ^~~~~~~
main.c:24:19: warning: comparison between pointer and integer
   24 |   if(solve(i+1,m) == "true" || solve(i+1,m[i]) == "true")
      |                   ^~
main.c:24:43: error: subscripted value is neither array nor pointer nor vector
   24 |   if(solve(i+1,m) == "true" || solve(i+1,m[i]) == "true")
      |                                           ^
main.c:24:3: error: expected expression at end of input
   24 |   if(solve(i+1,m) == "true" || solve(i+1,m[i]) == "true")
      |   ^~
main.c:24:3: error: expected declaration or statement at end of input