Print order of binary tree

< H2 > Program Source < / H2 >

this program comes from "the c programming language" chapter 6, section 5 of Kremr

< H2 > partial code < / H2 >
-sharpinclude<stdio.h>
-sharpdefine BUFSIZE 100

char buf[BUFSIZE];
int bufcp = 0;

int getch(void)
{
    int c;
    if(bufcp > 0)
        c = buf[--bufcp];
    else
        c = getchar();
    return c;
}

void ungetch(int c)
{
    if (bufcp < BUFSIZE)
        buf[bufcpPP] = c;
    else
        printf("error: the buf is over!\n");
}

description

The

getword function is used to read in a word

C
May.26,2021

clipboard.png

add it upside down

Menu