Language: C

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



struct node{
    int me;
    struct node *parent;
    struct node *left;
    struct node *right;
    
};
 struct node *Tree,*END;
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){
    struct node *a=Tree;
    struct node *b=END;
    struct node *c;
    
    c->me=n;
    c->left=END;
    c->right=END;
    
    
    while(b!=END){
        b=a;
        if(c->me < a->me){
            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(struct node *a){
    if(a==END)return;
    inorder(a->left);
    printf("%d",a->me);
    inorder(a->right);
    
    
}

void Preorder(struct node *a){
    if(a==END)return;
    printf("%d",a->me);
    preorder(a->left);
    preorder(a->right);
    
}


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




Compiler output:
main.c: In function 'input':
main.c:27:9: error: implicit declaration of function 'insert' [-Wimplicit-function-declaration]
   27 |         insert(n);
      |         ^~~~~~
main.c:30:13: error: implicit declaration of function 'Inorder' [-Wimplicit-function-declaration]
   30 |             Inorder(Tree);
      |             ^~~~~~~
main.c:32:13: error: implicit declaration of function 'Preorder' [-Wimplicit-function-declaration]
   32 |             Preorder(Tree);
      |             ^~~~~~~~
main.c: At top level:
main.c:40:6: warning: conflicting types for 'insert'; have 'void(int)'
   40 | void insert(int n){
      |      ^~~~~~
main.c:27:9: note: previous implicit declaration of 'insert' with type 'void(int)'
   27 |         insert(n);
      |         ^~~~~~
main.c:80:6: warning: conflicting types for 'Inorder'; have 'void(struct node *)'
   80 | void Inorder(struct node *a){
      |      ^~~~~~~
main.c:30:13: note: previous implicit declaration of 'Inorder' with type 'void(struct node *)'
   30 |             Inorder(Tree);
      |             ^~~~~~~
main.c: In function 'Inorder':
main.c:82:5: error: implicit declaration of function 'inorder'; did you mean 'Inorder'? [-Wimplicit-function-declaration]
   82 |     inorder(a->left);
      |     ^~~~~~~
      |     Inorder
main.c: At top level:
main.c:89:6: warning: conflicting types for 'Preorder'; have 'void(struct node *)'
   89 | void Preorder(struct node *a){
      |      ^~~~~~~~
main.c:32:13: note: previous implicit declaration of 'Preorder' with type 'void(struct node *)'
   32 |             Preorder(Tree);
      |             ^~~~~~~~
main.c: In function 'Preorder':
main.c:92:5: error: implicit declaration of function 'preorder'; did you mean 'Preorder'? [-Wimplicit-function-declaration]
   92 |     preorder(a->left);
      |     ^~~~~~~~
      |     Preorder