Language: C

#include <stdio.h>
 
int count(int matrix, int hi,int l,int k){
  int c = 0;
  for(int i = 0;i < l;i++){
    for(int j = 0;j < k;j++){
      if(strcmp(matrix[hi[j]],"#") == 0){
        c++;
      }
    }
  }
}

int pow2(int n){
  int a = 1;
  for(int i = 0;i < n;i++){
    a = a*2;
  }
  return a;
}

void makeBinary(int num, int digit, int* array[digit]) {
  int copiedNum = num;
  for (int i = digit - 1; i >= 0; i++) {
  	if (copiedNum >= pow2(i)) {
  	  array[i] = 1;
  	  copiedNum -= pow2(i);
	} else {
  	 array[i] = 0;
    }
  }
}


int main(void){
  int H, W, K;
  scanf("%d",&H);
  scanf("%d",&W);
  scanf("%d",&K);
 
  int matrix[W][H];
  for(int y = 0;y < H;y++){
	char str[256];
    scanf("%s",str);
    for(int x = 0;x < W;x++){
      matrix[x][y] = str[x] == '#';
    }
  }
  int answer = 0;
  for(int permY = 0;permY < pow2(H);permY++){
    int BinaryY[H];
    makeBinary(permY,H,BinaryY);
    for(int permX = 0;permX < pow2(W);permX++){
      int BinaryX[W];
      makeBinary(permX,W,BinaryX);
 	  int result = 0;
  	  for (int y = 0; y < H; y++) {
        for (int x = 0; x < W; x++) {
        result += matrix[x][y] && binaryX[x] && binaryY[y];
        }
      }
      answer += result == K
    }
  }
  printf("%d",answer);
  return 0;
}

Compiler output:
main.c: In function 'count':
main.c:7:10: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
    7 |       if(strcmp(matrix[hi[j]],"#") == 0){
      |          ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strcmp'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 | 
main.c:7:26: error: subscripted value is neither array nor pointer nor vector
    7 |       if(strcmp(matrix[hi[j]],"#") == 0){
      |                          ^
main.c: In function 'makeBinary':
main.c:26:20: error: assignment to 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   26 |           array[i] = 1;
      |                    ^
main.c: In function 'main':
main.c:52:24: error: passing argument 3 of 'makeBinary' from incompatible pointer type [-Wincompatible-pointer-types]
   52 |     makeBinary(permY,H,BinaryY);
      |                        ^~~~~~~
      |                        |
      |                        int *
main.c:22:42: note: expected 'int **' but argument is of type 'int *'
   22 | void makeBinary(int num, int digit, int* array[digit]) {
      |                                     ~~~~~^~~~~~~~~~~~
main.c:55:26: error: passing argument 3 of 'makeBinary' from incompatible pointer type [-Wincompatible-pointer-types]
   55 |       makeBinary(permX,W,BinaryX);
      |                          ^~~~~~~
      |                          |
      |                          int *
main.c:22:42: note: expected 'int **' but argument is of type 'int *'
   22 | void makeBinary(int num, int digit, int* array[digit]) {
      |                                     ~~~~~^~~~~~~~~~~~
main.c:59:35: error: 'binaryX' undeclared (first use in this function); did you mean 'BinaryX'?
   59 |         result += matrix[x][y] && binaryX[x] && binaryY[y];
      |                                   ^~~~~~~
      |                                   BinaryX
main.c:59:35: note: each undeclared identifier is reported only once for each function it appears in
main.c:59:49: error: 'binaryY' undeclared (first use in this function); did you mean 'BinaryY'?
   59 |         result += matrix[x][y] && binaryX[x] && binaryY[y];
      |                                                 ^~~~~~~
      |                                                 BinaryY
main.c:62:28: error: expected ';' before '}' token
   62 |       answer += result == K
      |                            ^
      |                            ;
   63 |     }
      |     ~