Language: C

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



struct node{
    int me;
    Tree *parent;
    Tree *left;
    Tree *right;
    
};
 struct node *Tree,*END;


Tree *tree;
int number;

void input(void){
    char str[100];
    int n;
    int i;
    scanf("%d",&number);
    for(i=0;i<number;i++){
        scanf("%s",str);
        if(strcmp(str,"insert")){
            scanf("%d",&n);
        insert(n);
        }
        else if(strcmp(str,"print")==1){
            Inorder(tree);
            printf("\n");
            Preorder(tree);
            printf("\n");
        }
    }
    
    
}

void insert(int n){
    Tree a=tree;
    Tree b=END;
    Tree c;
    
    c->me=n;
    c->left=END;
    c->right=END;
    
    
    while(b!=END){
        b=a;
        if(c->me < a->key){
            a=a->left;
                    }else {
                        a=a->right;
                    }
                    
                    
    }
    
    c->parent=b;
    if(b==END){
        tree=c;
        
    }else{
        if(c->me < b-> me){
            b->left=c;
            
            
        }else{
            b->right=c;
        }
        
    }
    
    
    
}

void inorder(Tree *a){
    if(a==END)return;
    inorder(u->left);
    printf("%d",u->me);
    inorder(u->right);
    
    
}

void preorder(Tree *a){
    if(a==END)return;
    printf("%d",a->key);
    preorder(a->left);
    preorder(a->right);
    
}


int main(void) {
    
    input();    
	return 0;
	
}




Compiler output:
main.c:8:5: error: unknown type name 'Tree'
    8 |     Tree *parent;
      |     ^~~~
main.c:9:5: error: unknown type name 'Tree'
    9 |     Tree *left;
      |     ^~~~
main.c:10:5: error: unknown type name 'Tree'
   10 |     Tree *right;
      |     ^~~~
main.c:16:1: error: unknown type name 'Tree'
   16 | Tree *tree;
      | ^~~~
main.c: In function 'input':
main.c:28:9: error: implicit declaration of function 'insert' [-Wimplicit-function-declaration]
   28 |         insert(n);
      |         ^~~~~~
main.c:31:13: error: implicit declaration of function 'Inorder' [-Wimplicit-function-declaration]
   31 |             Inorder(tree);
      |             ^~~~~~~
main.c:33:13: error: implicit declaration of function 'Preorder' [-Wimplicit-function-declaration]
   33 |             Preorder(tree);
      |             ^~~~~~~~
main.c: At top level:
main.c:41:6: warning: conflicting types for 'insert'; have 'void(int)'
   41 | void insert(int n){
      |      ^~~~~~
main.c:28:9: note: previous implicit declaration of 'insert' with type 'void(int)'
   28 |         insert(n);
      |         ^~~~~~
main.c: In function 'insert':
main.c:42:9: error: expected ';' before 'a'
   42 |     Tree a=tree;
      |         ^~
      |         ;
main.c:43:9: error: expected ';' before 'b'
   43 |     Tree b=END;
      |         ^~
      |         ;
main.c:44:9: error: expected ';' before 'c'
   44 |     Tree c;
      |         ^~
      |         ;
main.c:46:5: error: 'c' undeclared (first use in this function)
   46 |     c->me=n;
      |     ^
main.c:46:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:51:11: error: 'b' undeclared (first use in this function)
   51 |     while(b!=END){
      |           ^
main.c:52:11: error: 'a' undeclared (first use in this function)
   52 |         b=a;
      |           ^
main.c: At top level:
main.c:81:14: error: expected declaration specifiers or '...' before 'Tree'
   81 | void inorder(Tree *a){
      |              ^~~~
main.c:90:15: error: expected declaration specifiers or '...' before 'Tree'
   90 | void preorder(Tree *a){
      |               ^~~~