File handling programming exercises and solutions in C

In programming we use variables to store data. Variables are powerful at storing data, but they are volatile. They lose their value after program termination.

However, their exists situations where we want persistent data. The data should persist even after program termination and can be used anytime later. A file is a physical storage location on disk where data is persisted (stored permanently). We use file to store data permanently on hard disk, that can be used in future.

Continue reading File handling programming exercises and solutions in C

C program to list all files in a directory recursively

Write a C program to list all files in a directory. How to list all files in a directory recursively. How to use readdir() function to list all files in a directory recursively. Logic to list all files and sub-directories of a directory in C programming. How to use opendir(), readdir() and closedir() library functions.

Continue reading C program to list all files in a directory recursively

C program to convert uppercase to lowercase and vice versa in file

Quick links

Write a C program to convert uppercase to lowercase and vice versa in file. How to convert uppercase characters to lowercase and vice versa in a file in C programming. Logic to convert uppercase characters to lowercase and vice versa in C program.

Continue reading C program to convert uppercase to lowercase and vice versa in file