[prev] 100 [next]

Exercise #10: Implement Bracket Matching Algorithm in C

  • Use Stack ADO

    #include "Stack.h"
    

  • Sidetrack: Character I/O Functions in C   (requires <stdio.h>)

    int getchar(void);
    

    • returns character read from standard input as an int, or returns EOF on end of file   (keyboard: CTRL-D on Unix, CTRL-Z on Windows)

    int putchar(int ch);
    

    • writes the character ch to standard output
    • returns the character written, or EOF on error