In this way you can traverse to a tree in preorder. I guess this helps you on your way for a search function.
Extend the function in such a way that it also accepts a variable which contains the value which is searched for. Also add code for comparison and find a way to tell the calling function if the value was found or not and if it was found, find out how to let the calling function know which node contains the value.
void preorder (struct btree *root)
printf ("%d\n", root->data);