Ask
Search
Ask Question
Login
×
×
Welcome back.
and 5 others joined a min ago.
Continue with Google
Continue with email
0
1.3k
views
What is file? Explain various file handling operations in C
written
7.3 years ago
by
sumayassrbg2000
•
0
modified 6.2 years ago by
sushanth2071
•
0
data structures and algorithms
ADD COMMENT
FOLLOW
SHARE
EDIT
1 Answer
0
9
views
written
7.3 years ago
by
sumayassrbg2000
•
0
• modified 7.3 years ago
A file represents a sequence of bytes on the disk where a group of related data is stored. File is created for permanent storage of data.
In C language, we use a structure pointer of file type to declare a file. FILE *fp;
C provides a number of functions that helps to perform basic file operations.
Following are the functions.
fopen()
: This command is used to open a particular file.
fclose(fptr)
: This command is used to close a file.
getc ()
: Used to read from the file.(SingleCharacter)
putc()
: Used to write into the file. (SingleCharacter)
fprinf()
: write multiple data to file.
ADD COMMENT
SHARE
EDIT
Please
log in
to add an answer.
Community
Users
Levels
Badges
Content
All posts
Tags
Dashboard
Company
About
Team
Privacy
Submit question paper solutions and earn money