C94. Working with files in binary mode | fread and fwrite functions in C

Опубликовано: 25 Март 2026
на канале: Tech Courses
458
10

In this video we are going to discuss about fread and fwrite functions in C.
These functions are used for reading and writing files in binary mode.

Summary :
struct Student st;

fread(&st, sizeof(st), count, filePtr)
Reads count records of type st from filePtr location.

fwrite((&st, sizeof(st), count, filePtr)
Write count records of type st at filePtr location.

Advantages:
Makes structure reading/writing easy.
If number of elements in structure changes, fread and fwrite functions still remains same.
Work in binary mode for files, so stores numbers efficiently.

Audio language : Hindi
In this course , we are going to cover all C concepts in simple and easy to understand terms.
This course started from basics and now we are covering advance topics that are important from interview point of view.

Github : https://github.com/TechCourses4u/C-La...
Programs :
https://github.com/TechCourses4u/C-La...