Waterloo C - stdout output

mackie mackie at watdcsu.UUCP
Fri Apr 12 10:30:22 AEST 1985


    On CMS, output to "stdout" is buffered. The contents of the
buffer are displayed when any of the following conditions are
satisfied:
    a) the buffer is full,
    b) an explicit call to "fflush( stdout )" is made,
    c) the program ends, or
    d) a terminal read operation (e.g., "getchar()") takes
       place.

Following is an example of a program that should demonstrate
case 'd':

-----------cut here-----------
#include <stdio.h>
     
extern
    printf();
     
main()
{
    printf( "Press RETURN or ENTER\n" );
    printf( "getchar() returned '%d'\n", getchar() );
    return( 0 );
}



More information about the Comp.lang.c mailing list