Before hopping onto file handling and other important questions related to it let us first really get to know what actually all the fuss is about file systems, their handling, access, manipulation among many others. Okay, so I’ll prefer coming straight on basic concepts.
What is FileSystem ?
You can relate it basically with a particular data structure used for storing records or data by the respective operating system. Different filesystems are used depending upon the operating system one uses.
What are the different types of filesystems used ?
A variety of filesystems are currently used by various operating systems depending upon the nature of use and compatibility viz FAT and all its upgraded versions, NTFS, ZFS, Veritas, XFS, etc. Among these the popular or predominantly being used is NTFS.
What is NTFS ?
NTFS is referred as New Technology File System and is equivalent of FAT from windows 95. It’s used for storing and retrieving files from disk. The major technical improvements in NTFS from FAT are reliability, encryption, security, transaction speed, scalability, etc.
What is FAT ?
File Allocation Table is called as the FAT filesystem. Although it is old but still solid. The major reason for FAT being still used is the compatibility ease which it offers makes it easy to switch from one filesystem to other quickly.
Difference between NTFS and FAT ?
A big advantage of preferring NTFS over FAT is improved error correcting ability along with the high scalability. Along with that compression is good with NTFS and the problem of fragmentation is minimised.
So why File handling ?
Be it any programming language file handling plays quite an important role in storing data and manipulating the records. Also, it gives the general overview about the way every operating system goes in storing data.
Not just this there are few basic coding questions asked regarding file handling. I’ll try and enlist few of those so that it may help you guys with some idea while preparing from a practical point of view.
- To create, insert, modify and delete the file.
- Get the count of the total number of characters from the given file.
- Write a program to print the content and reverse and also compare the two files.
- Merge two files and delete the middle paragraph from the merged file.
- Convert the lower case characters to upper case characters and vice versa.
I hope friends you’ve got pretty clear understanding of how you can proceed and reach the higher level with more concerned efforts. Since these are just few basic questions and there are many more which you can practice on more or less similar lines. Also revise the coding questions of geeksforgeeks related to file handling if you are looking for something extra. Happy learning!!!