Skip to content

Tag Archives: C-File Handling

Pre-requisite: Basics of File Handling in C Given a text file in a directory, the task is to print all the odd line content of… Read More
Pre-requisite: File Handling in CGiven a file containing some text, and two strings wordToBeFind and wordToBeReplacedWith, the task is to find all occurrences of the… Read More
Pre-requisite: Basics of File Handling in CThe fopen() method in C is a library function that is used to open a file to perform various… Read More
Counting the number of characters is important because almost all the text boxes that rely on user input have certain limitations on the number of… Read More
Prerequisite: Selection Sort In this article, we are going to apply selection sort algorithm, in which the source of input is A FILE CONTAINING 10000… Read More
The fread() function in C++ reads the block of data from the stream. This function first, reads the count number of objects, each one with… Read More
Lower Case To Upper Case Given a text file(gfg.txt), our task is to convert all the lower case characters of file into upper case. Examples:… Read More
Given a text file, find its size in bytes. Examples: Input : file_name = "a.txt" Let "a.txt" contains "geeks" Output : 6 Bytes There are… Read More
Prerequisite : Basics of File Handling In C language, while file handling is done a word FILE is used. What is FILE? Example FILE *fp1,… Read More
rename() function is used to change the name of the file or directory i.e. from old_name to new_name without changing the content present in the… Read More
For reading a string value with spaces, we can use either gets() or fgets() in C programming language. Here, we will see what is the… Read More
The fsetpos() function moves the file position indicator to the location specified by the object pointed to by position. When fsetpos() is executed ,the end-of-file… Read More
In C Programming Language, the tmpfile() function is used to produce/create a temporary file. tmpfile() function is defined in the “stdio.h” header file. The created… Read More
fseek() is used to move file pointer associated with a given file to a specific position. Syntax: int fseek(FILE *pointer, long int offset, int position)… Read More
How to print source code of a C program itself? Note this is different from Quine problem. Here we need to modify any C program… Read More

Start Your Coding Journey Now!