Language: C

#include <stdio.h>
#define H 250;


struct Node{
  int key;
  struct Node right,left,parent;
};



int main(){
  int i,n,A[H],id;

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



 for(i=1;i<=n;i++){
   A[i].right=right(i);
   A[i].left=left(i);
   A[i].parent=parent(i);
 }

 for(i=1;i<=n;i++){
   id=i;
   printf("node %d: key = %d, parent key = %d, left key = %d, right key = %d \n",id,A[i],parent.A[i],left.A[i],right.A[i]);

 }

 return 0;
}


  Node parent(struct int i){
     if(i<=1) return " ";
    return floor(i/2);
    
  }
  
  Node left(struct int i){
    return 2*i;
  }
  
  Node right(struct int i){
    return (2*i)+1;
    
  }
  

Compiler output:
main.c:7:15: error: field 'right' has incomplete type
    7 |   struct Node right,left,parent;
      |               ^~~~~
main.c:7:21: error: field 'left' has incomplete type
    7 |   struct Node right,left,parent;
      |                     ^~~~
main.c:7:26: error: field 'parent' has incomplete type
    7 |   struct Node right,left,parent;
      |                          ^~~~~~
main.c: In function 'main':
main.c:2:14: error: expected ']' before ';' token
    2 | #define H 250;
      |              ^
main.c:13:13: note: in expansion of macro 'H'
   13 |   int i,n,A[H],id;
      |             ^
main.c:17:17: error: 'A' undeclared (first use in this function)
   17 |     scanf("%d",&A[i]);
      |                 ^
main.c:17:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:23:15: error: implicit declaration of function 'right' [-Wimplicit-function-declaration]
   23 |    A[i].right=right(i);
      |               ^~~~~
main.c:24:14: error: implicit declaration of function 'left' [-Wimplicit-function-declaration]
   24 |    A[i].left=left(i);
      |              ^~~~
main.c:25:16: error: implicit declaration of function 'parent' [-Wimplicit-function-declaration]
   25 |    A[i].parent=parent(i);
      |                ^~~~~~
main.c:29:4: error: 'id' undeclared (first use in this function); did you mean 'i'?
   29 |    id=i;
      |    ^~
      |    i
main.c:30:90: error: 'parent' undeclared (first use in this function)
   30 |    printf("node %d: key = %d, parent key = %d, left key = %d, right key = %d \n",id,A[i],parent.A[i],left.A[i],right.A[i]);
      |                                                                                          ^~~~~~
main.c:30:102: error: 'left' undeclared (first use in this function)
   30 |    printf("node %d: key = %d, parent key = %d, left key = %d, right key = %d \n",id,A[i],parent.A[i],left.A[i],right.A[i]);
      |                                                                                                      ^~~~
main.c:30:112: error: 'right' undeclared (first use in this function)
   30 |    printf("node %d: key = %d, parent key = %d, left key = %d, right key = %d \n",id,A[i],parent.A[i],left.A[i],right.A[i]);
      |                                                                                                                ^~~~~
main.c: At top level:
main.c:38:3: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   38 |   Node parent(struct int i){
      |   ^~~~
      |   struct 
main.c:38:22: error: expected '{' before 'int'
   38 |   Node parent(struct int i){
      |                      ^~~
main.c:38:22: error: two or more data types in declaration specifiers
main.c: In function 'parent':
main.c:39:22: error: returning 'char *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
   39 |      if(i<=1) return " ";
      |                      ^~~
main.c:40:12: error: implicit declaration of function 'floor' [-Wimplicit-function-declaration]
   40 |     return floor(i/2);
      |            ^~~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'floor'
    1 | #include <stdio.h>
  +++ |+#include <math.h>
    2 | #define H 250;
main.c:40:12: warning: incompatible implicit declaration of built-in function 'floor' [-Wbuiltin-declaration-mismatch]
   40 |     return floor(i/2);
      |            ^~~~~
main.c:40:12: note: include '<math.h>' or provide a declaration of 'floor'
main.c: At top level:
main.c:44:3: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   44 |   Node left(struct int i){
      |   ^~~~
      |   struct 
main.c:44:20: error: expected '{' before 'int'
   44 |   Node left(struct int i){
      |                    ^~~
main.c:44:20: error: two or more data types in declaration specifiers
main.c:48:3: error: unknown type name 'Node'; use 'struct' keyword to refer to the type
   48 |   Node right(struct int i){
      |   ^~~~
      |   struct 
main.c:48:21: error: expected '{' before 'int'
   48 |   Node right(struct int i){
      |                     ^~~
main.c:48:21: error: two or more data types in declaration specifiers