--- In [email protected], Gopi Krishna Komanduri <[EMAIL PROTECTED]> wrote: > > struct Tree *node = (struct Tree*)malloc(sizeof(struct Tree*));
node is a Tree pointer, so you should be allocating sizeof(struct
Tree) (= 16 probably), not sizeof(struct Tree*) (= 4 probably).
It should be:
struct Tree *node = malloc(sizeof *node);
Similarly for 'dummy' in the else section.
John
