Tutorials
Courses
Go Premium
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
32.1K+ articles
DSA
20.0K+ articles
Misc
7.8K+ articles
C++
3.7K+ articles
C Language
1.3K+ articles
C Programs
441+ articles
CPP-Library
254+ articles
C-Functions
90+ articles
cpp-file-handling
57+ articles
File Handling
24+ articles
C-File Handling
44 posts
Recent Articles
Popular Articles
Advanced Topics Interview Questions - C Programming
Last Updated: 08 August 2025
C programming isn’t just about printf() and for loops. For technical interviews, especially in system-level, embedded, or product-based roles, you’re expected to master th...
read more
AdvanceC
C-File Handling
recursive-approach
Interview Prep
perror() in C
Last Updated: 03 February 2025
In C, perror() is a built-in function used to display a custom text description of the error code, which is stored in the system variable errno.Example:C#include stdio.hin...
read more
C Language
C-Functions
C-File Handling
rewind() in C
Last Updated: 23 July 2025
In C, rewind() is a built-in function used to reset the given file pointer to the beginning of a file allowing the read and write from the beginning once again in the prog...
read more
C Language
C-Functions
C-File Handling
fwrite() in C
Last Updated: 08 January 2025
In C, fwrite() is a built-in function used to write a block of data from the program into a file. It can write arrays, structs, or other data to files but is especially de...
read more
C Language
C-Functions
C-File Handling
fclose() Function in C
Last Updated: 23 July 2025
In C language, fclose() is a standard library function used to close a file that was previously opened using fopen(). This function is the itegral part of the file handlin...
read more
C Language
C-Functions
C-File Handling
How to Read Input Until EOF in C?
Last Updated: 23 July 2025
In C, reading input until the End of the File (EOF) involves reading input until it reaches the end i.e. end of file. In this article, we will learn various methods throug...
read more
C Programs
C Language
Picked
c-input-output
C-File Handling
C Examples
How to Read From a File in C?
Last Updated: 17 June 2024
File handing in C is the process in which we create, open, read, write, and close operations on a file. C language provides different functions such as fopen(), fwrite(), ...
read more
C Programs
C Language
Picked
C-File Handling
C Examples
How to Read a File Line by Line in C?
Last Updated: 29 May 2025
In C, reading a file line by line is a process that involves opening the file, reading its contents line by line until the end of the file is reached, processing each line...
read more
C Programs
C Language
Picked
C-File Handling
C File Handling Programs
C Examples
How to Write a Struct to a Binary File in C?
Last Updated: 23 July 2025
C file handling allows users to store the data from a C program to a file in either the text or the binary format. In this article, we will learn how to write a struct to ...
read more
C Programs
C Language
Picked
C-Structure & Union
C-File Handling
C Examples
How to Read a Struct from a Binary File in C?
Last Updated: 23 July 2025
The structure in C allows the users to create user-defined data types that can be used to group data items of different types into a single unit. We can save this structur...
read more
C Programs
C Language
Picked
C-Structure & Union
C-File Handling
C Examples
C File Handling Programs
Last Updated: 23 July 2025
C Program to list all files and sub-directories in a directoryC Program to count number of lines in a fileC Program to print contents of fileC Program to copy contents of ...
read more
C Programs
C Language
C-File Handling
C File Handling Programs
C Program to Read Content of a File
Last Updated: 23 July 2025
In C, reading a file is a step-by-step process in which we first have to prepare the file only after which we can start reading. It involves opening the file, reading its ...
read more
C Programs
C Language
C-File Handling
Opening Modes in Standard I/O in C/C++ with Examples
Last Updated: 23 July 2025
Pre-requisites: File Handling in C++So far the operations using the C program are done on a prompt/terminal that is not stored anywhere. But in the software industry, most...
read more
C++
cpp-file-handling
C-File Handling
How to create Binary File from the existing Text File?
Last Updated: 23 July 2025
In this article, we will discuss how to create a binary file from the given text file. Before proceeding to the steps, let's have an introduction of what are text files an...
read more
C++ Programs
C++
C-File Handling
File Handling
C program to read a range of bytes from file and print it to console
Last Updated: 06 August 2025
Given a file F, the task is to write C program to print any range of bytes from the given file and print it to a console.Functions Used:fopen(): Creation of a new file. Th...
read more
C Programs
C Language
C-File Handling
File Handling
1
2
3
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !