先序列建立二叉树的问题


#include <stdio.h>
#include <stdlib.h>
#define N 100
typedef char datatype;
typedef struct node     /*二叉树结构定义*/
{
    datatype data;
    struct node *lch,*rch;
}bnode;

void fstorder(bnode *p)      /*先序递归遍历二叉树*/
{
    if(p)
    {
        printf("%c",p->data);
        fstorder(p->lch);
        fstorder(p->rch);
    }
}
void lastorder(bnode *p)     /*后序递归遍历二叉树*/
{
    if(p)
    {
        lastorder(p->lch);
        lastorder(p->rch);
        printf("%c",p->data);
    }
}
bnode  *creat()
{
   bnode *p;
   p=(bnode *)malloc(sizeof(bnode));
   char x; 
   scanf("%c", &x);   /*输入结点的数据域*/
   
   if('#'==x) 
   {p=NULL;}
   
   else{ 
            p->data=x;           /*建立根结点*/
            p->lch=creat();   /*建立左子树*/
            p->rch=creat();
        } /*建立右子树*/
   return p;
}
main()
{
    bnode *p;
    p=creat();
    fstorder(p);
}

这代码可以运行,但一直输入却没有输出
咋改啊