Language: C

include<stdio.h>

#define N 100000

typedef struct
{
  int parent;
  int left;
  int right;
} node;


int finddepth(int);

node A[N];

int main()
{
  int pa, pr, x, i, j, n, k;

  scanf("%d", &n);
  for(i=0; i<n; i++)
    {
      A[i].parent = -1;
      A[i].left = -1;
      A[i].right = -1;
    }

  for(i=0; i<n; i++)
    {
      scanf("%d%d", &pa, &k);
      if(k!=0)
    {
      scanf("%d", &x);
      A[pa].left = x;
      A[x].parent = pa;
      pr = x;
    }
      for(j=1; j<k; j++)
    {
      scanf("%d", &x);
      A[x].parent = pa;
      A[pr].right = x;
      pr = x;
    }
    }
  for(i=0; i<n; i++)
    {
      printf("node %d: parent = %d, depth = %d, ", i, A[i].parent, finddepth(i));
      if(A[i].parent == -1)
    {
      printf("root, ");
    }
      else if(A[i].left != -1)
    {
      printf("internal node, ");
    }
      else
    {
      printf("leaf, ");
    }
      printf("[");
      if(T[i].left != -1)
    {
      printf("%d", pr=A[i].left);
    }
      while(A[pr].right != -1)
    {
      printf(", %d", A[pr].right);
      pr = A[pr].right;
    }
      printf("]\n");
    }

  return 0;
}

int finddepth(int x)
{
  int c=0;
  while(A[x].parent >= 0)
    {
      c++;
      x = A[x].parent;
    }
  return c;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c:10:3: warning: data definition has no type or storage class
   10 | } node;
      |   ^~~~
main.c:10:3: error: type defaults to 'int' in declaration of 'node' [-Wimplicit-int]
main.c:15:1: error: unknown type name 'node'
   15 | node A[N];
      | ^~~~
main.c: In function 'main':
main.c:21:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   21 |   scanf("%d", &n);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include<stdio.h>
main.c:21:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   21 |   scanf("%d", &n);
      |   ^~~~~
main.c:21:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:24:11: error: request for member 'parent' in something not a structure or union
   24 |       A[i].parent = -1;
      |           ^
main.c:25:11: error: request for member 'left' in something not a structure or union
   25 |       A[i].left = -1;
      |           ^
main.c:26:11: error: request for member 'right' in something not a structure or union
   26 |       A[i].right = -1;
      |           ^
main.c:35:12: error: request for member 'left' in something not a structure or union
   35 |       A[pa].left = x;
      |            ^
main.c:36:11: error: request for member 'parent' in something not a structure or union
   36 |       A[x].parent = pa;
      |           ^
main.c:42:11: error: request for member 'parent' in something not a structure or union
   42 |       A[x].parent = pa;
      |           ^
main.c:43:12: error: request for member 'right' in something not a structure or union
   43 |       A[pr].right = x;
      |            ^
main.c:49:7: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   49 |       printf("node %d: parent = %d, depth = %d, ", i, A[i].parent, finddepth(i));
      |       ^~~~~~
main.c:49:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:49:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:49:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:49:59: error: request for member 'parent' in something not a structure or union
   49 |       printf("node %d: parent = %d, depth = %d, ", i, A[i].parent, finddepth(i));
      |                                                           ^
main.c:50:14: error: request for member 'parent' in something not a structure or union
   50 |       if(A[i].parent == -1)
      |              ^
main.c:54:19: error: request for member 'left' in something not a structure or union
   54 |       else if(A[i].left != -1)
      |                   ^
main.c:63:10: error: 'T' undeclared (first use in this function)
   63 |       if(T[i].left != -1)
      |          ^
main.c:63:10: note: each undeclared identifier is reported only once for each function it appears in
main.c:65:27: error: request for member 'left' in something not a structure or union
   65 |       printf("%d", pr=A[i].left);
      |                           ^
main.c:67:18: error: request for member 'right' in something not a structure or union
   67 |       while(A[pr].right != -1)
      |                  ^
main.c:69:27: error: request for member 'right' in something not a structure or union
   69 |       printf(", %d", A[pr].right);
      |                           ^
main.c:70:17: error: request for member 'right' in something not a structure or union
   70 |       pr = A[pr].right;
      |                 ^
main.c: In function 'finddepth':
main.c:81:13: error: request for member 'parent' in something not a structure or union
   81 |   while(A[x].parent >= 0)
      |             ^
main.c:84:15: error: request for member 'parent' in something not a structure or union
   84 |       x = A[x].parent;
      |               ^