Language: C

#include <stdio.h>
#include <math.h>
#include <string.h>

void main() {

    int N;
    int i, j;
    int n = 0;
    int m;
    int chk;
    int count;
    int flag;
    char *S;
    char buf[1000];

    fgets(buf, sizeof(buf), stdin);
    sscanf(buf, "%d\n", &N);
    count = N;
    int k[N];
    char *S = (char*)malloc(sizeof(char[10 + 1]) * 2 * pow(10, 5));
    for (i = 1; i <= N; i++) {
        fgets(buf, sizeof(buf), stdin);
        sscanf(buf, "%s\n", S[N]);
    }
    for (i = 1; i <= N; i++) {
        for (m = 0; m < n; m++) {
            flag = 0;
            if (k[m] == i) {
                flag = 1;
                break;
            } 
        }
        if (flag == 0) {
            for (j = N; j > i; j--){
                chk = strcmp(S[i], S[j]);
                if (0 == chk){
                    count--;
                    k[n] = j;
                    n++;
                }
            }
        }
    }
    printf ("%d", n+1);
    free(S);
    return;
}

Compiler output:
main.c: In function 'main':
main.c:21:11: error: redeclaration of 'S' with no linkage
   21 |     char *S = (char*)malloc(sizeof(char[10 + 1]) * 2 * pow(10, 5));
      |           ^
main.c:14:11: note: previous declaration of 'S' with type 'char *'
   14 |     char *S;
      |           ^
main.c:21:22: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
   21 |     char *S = (char*)malloc(sizeof(char[10 + 1]) * 2 * pow(10, 5));
      |                      ^~~~~~
main.c:4:1: note: include '<stdlib.h>' or provide a declaration of 'malloc'
    3 | #include <string.h>
  +++ |+#include <stdlib.h>
    4 | 
main.c:21:22: warning: incompatible implicit declaration of built-in function 'malloc' [-Wbuiltin-declaration-mismatch]
   21 |     char *S = (char*)malloc(sizeof(char[10 + 1]) * 2 * pow(10, 5));
      |                      ^~~~~~
main.c:21:22: note: include '<stdlib.h>' or provide a declaration of 'malloc'
main.c:36:31: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   36 |                 chk = strcmp(S[i], S[j]);
      |                              ~^~~
      |                               |
      |                               char
In file included from main.c:3:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:36:37: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   36 |                 chk = strcmp(S[i], S[j]);
      |                                    ~^~~
      |                                     |
      |                                     char
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
main.c:46:5: error: implicit declaration of function 'free' [-Wimplicit-function-declaration]
   46 |     free(S);
      |     ^~~~
main.c:46:5: note: include '<stdlib.h>' or provide a declaration of 'free'
main.c:46:5: warning: incompatible implicit declaration of built-in function 'free' [-Wbuiltin-declaration-mismatch]
main.c:46:5: note: include '<stdlib.h>' or provide a declaration of 'free'