CAN YOU FIND THE ERRORS IN THIS PROGRAM??
#include<stdio.h> #include<stdlib.h> struct tree { int data; struct tree*leftchild; struct tree*rightchild; }*root=NULL; void insert(int data) { struct tree*tempnode=(struct tree*)malloc(sizeof(struct tree)); struct tree*current; struct tree*parent; tempnode->data=data; tempnode->leftchild=NULL; tempnode->rightchild=NULL; if(root=NULL) { root=tempnode; } else { current=root; parent=NULL; while(1) { parent=current; if(data<parent->data) { current=current->leftchild; if(current=NULL) { parent->leftchild=tempnode; return; } } else { current=current->rightchild; if(current=NULL) { parent->rightchild=tempnode; return; } } } } } int main() { int i; int arr[8]={22,33,12,42,23,43,25,35}; for(i=0;i<8;i++) { insert(arr[i]); printf("success"); } return 0; }