Standard Input/Output Library - University of Windsor
Standard Input/Output Library - University of Windsor
Standard Input/Output Library - University of Windsor
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Example 2IntroductionStreams and FILE objectsBufferingOpening a StreamReading and writing a streamFully buffered I/OLine buffered I/OUnbuffered I/OANSI C buffering requirementsChanging the default bufferingExamples#include #include // This is needed for sleep()int main(void){// forcing the flush with fflushint i=0;char line[100]="Hello, my name No-Name\n";while(line[i] != NULL){putchar(line[i++]);fflush(stdout); // flush std output buffersleep(1);}}<strong>Standard</strong> <strong>Input</strong>/<strong>Output</strong> <strong>Library</strong>60-256 System Programming