Skip to Main Content
Data Structures Using C, 2nd Edition by Pearson
book

Data Structures Using C, 2nd Edition by Pearson

by A. K. Sharma
May 2024
Intermediate to advanced content levelIntermediate to advanced
521 pages
14h 12m
English
Pearson India
Content preview from Data Structures Using C, 2nd Edition by Pearson
Files 419
9.6.2 Unformatted File I/O Operations
An opened file can be read or written by the following set of unformatted I/O functions:
fget(), get(), fgetchar()
getw(), fputc(), putc()
fputchar(), fputs(), putw()
A brief description of each function has already been provided in Table 9.2.
Let us consider a situation wherein we desire to create a file called “message.dat” containing the
following text:
“When one apple fell, Newton was disturbed;
but when he found that all apples fell;
it was gravitation and he was satisfied”.
The file “message.dat” would be opened with the help of fopen() function and the function
fputs()
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Data Structures Using C

Data Structures Using C

Samir Kumar Bandyopadhyay, Kashi Nath Dey
Intermediate C Programming, 2nd Edition

Intermediate C Programming, 2nd Edition

Yung-Hsiang Lu, George K. Thiruvathukal

Publisher Resources

ISBN: 9781299831582