Lecture 16 PDF
Lecture 16 PDF
Lecture 16
File I/O in C
Lecture Topics
File I/O in C
o Stream and buffered I/O concepts
o Creating I/O streams: fopen, fclose
o I/O one char at a time: fgetc, fputc
o I/O one line at a time: fgets, fputs
o End of file: EOF & feof
o Formatted I/O: fprintf, fscanf
Lecture materials
Textbook Ch. 18
Additional topics
SP16
V. Kindratenko
ECE 220
Lecture 16
SP16
V. Kindratenko
ECE 220
Lecture 16
end-of-file indicator */
fclose(inf);
fclose(outf);
return 0;
}
SP16
V. Kindratenko
ECE 220
Lecture 16
SP16
V. Kindratenko
ECE 220
Lecture 16
SP16
V. Kindratenko