Language: C

int main(void){
  uint32_t n;
  scanf("%"PRIu32, &n);
  uint32_t *d;
  do{ d=calloc(n, sizeof(uint32_t)); }while(!d);
  for(uint32_t i=0; i<n; i++){
    uint32_t a;
    scanf("%"PRIu32, &a);
    d[a-1]++;
  }
  for(uint32_t i=0; i<n; i++){
    printf("%d"PRIu32"\n", d[i]);
  }
  free(d); d=NULL;
}


Compiler output:
main.c: In function 'main':
main.c:2:3: error: unknown type name 'uint32_t'
    2 |   uint32_t n;
      |   ^~~~~~~~
main.c:1:1: note: 'uint32_t' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'
  +++ |+#include <stdint.h>
    1 | int main(void){
main.c:3:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 |   scanf("%"PRIu32, &n);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:3:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 |   scanf("%"PRIu32, &n);
      |   ^~~~~
main.c:3:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:3:12: error: expected ')' before 'PRIu32'
    3 |   scanf("%"PRIu32, &n);
      |        ~   ^~~~~~
      |            )
main.c:1:1: note: 'PRIu32' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'
  +++ |+#include <inttypes.h>
    1 | int main(void){
main.c:4:3: error: unknown type name 'uint32_t'
    4 |   uint32_t *d;
      |   ^~~~~~~~
main.c:4:3: note: 'uint32_t' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'
main.c:5:9: error: implicit declaration of function 'calloc' [-Wimplicit-function-declaration]
    5 |   do{ d=calloc(n, sizeof(uint32_t)); }while(!d);
      |         ^~~~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'calloc'
  +++ |+#include <stdlib.h>
    1 | int main(void){
main.c:5:9: warning: incompatible implicit declaration of built-in function 'calloc' [-Wbuiltin-declaration-mismatch]
    5 |   do{ d=calloc(n, sizeof(uint32_t)); }while(!d);
      |         ^~~~~~
main.c:5:9: note: include '<stdlib.h>' or provide a declaration of 'calloc'
main.c:5:26: error: 'uint32_t' undeclared (first use in this function)
    5 |   do{ d=calloc(n, sizeof(uint32_t)); }while(!d);
      |                          ^~~~~~~~
main.c:5:26: note: 'uint32_t' is defined in header '<stdint.h>'; this is probably fixable by adding '#include <stdint.h>'
main.c:5:26: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:15: error: expected ';' before 'i'
    6 |   for(uint32_t i=0; i<n; i++){
      |               ^~
      |               ;
main.c:6:21: error: 'i' undeclared (first use in this function)
    6 |   for(uint32_t i=0; i<n; i++){
      |                     ^
main.c:7:13: error: expected ';' before 'a'
    7 |     uint32_t a;
      |             ^~
      |             ;
main.c:8:14: error: expected ')' before 'PRIu32'
    8 |     scanf("%"PRIu32, &a);
      |          ~   ^~~~~~
      |              )
main.c:8:14: note: 'PRIu32' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'
    8 |     scanf("%"PRIu32, &a);
      |              ^~~~~~
main.c:9:7: error: 'a' undeclared (first use in this function)
    9 |     d[a-1]++;
      |       ^
main.c:11:15: error: expected ';' before 'i'
   11 |   for(uint32_t i=0; i<n; i++){
      |               ^~
      |               ;
main.c:12:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   12 |     printf("%d"PRIu32"\n", d[i]);
      |     ^~~~~~
main.c:12:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:12:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:12:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:12:16: error: expected ')' before 'PRIu32'
   12 |     printf("%d"PRIu32"\n", d[i]);
      |           ~    ^~~~~~
      |                )
main.c:12:16: note: 'PRIu32' is defined in header '<inttypes.h>'; this is probably fixable by adding '#include <inttypes.h>'
   12 |     printf("%d"PRIu32"\n", d[i]);
      |                ^~~~~~
main.c:14:3: error: implicit declaration of function 'free' [-Wimplicit-function-declaration]
   14 |   free(d); d=NULL;
      |   ^~~~
main.c:14:3: note: include '<stdlib.h>' or provide a declaration of 'free'
main.c:14:3: warning: incompatible implicit declaration of built-in function 'free' [-Wbuiltin-declaration-mismatch]
main.c:14:3: note: include '<stdlib.h>' or provide a declaration of 'free'
main.c:14:14: error: 'NULL' undeclared (first use in this function)
   14 |   free(d); d=NULL;
      |              ^~~~
main.c:1:1: note: 'NULL' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
  +++ |+#include <stddef.h>
    1 | int main(void){