Computer Knowledge
Computer File Systems
1,249 Questions
Computer file systems dictate how data is stored, organized, and retrieved on storage devices. Important concepts include file allocation tables, access mechanisms, and various formats like sequential and video files. Candidates preparing for banking and government exams should practice these fundamentals thoroughly.
File access mechanismsVideo and password filesFile extensionsFile allocation tableSystem metadata
Computer File Systems Questions
B
Correct answer
Explanation
Windows supports filenames up to 255 characters, excluding the drive letter, path, and extension. This is a limitation of the FAT/NTFS file systems and has been a consistent feature of Windows file management.
-
Reliability
-
Strong name
-
Assembly name
-
List of all files in the assembly
-
Windows forms
B
Correct answer
Explanation
This assembly manifest content represents the public key from the publisher.
B
Correct answer
Explanation
FASTA format sequence files always begin with a '>' (greater-than) character followed by a unique identifier and description. This header line introduces each sequence record and distinguishes it from the actual nucleotide or amino acid sequence data that follows.
-
They can be easily read and written.
-
They need a special program to read and write.
-
Processing of binary files is slow.
-
Binary data files are damaged easily.
B
Correct answer
Explanation
Binary data files need a special program to read and write. Because binary data files contain only 0 and 1.
-
iostream
-
ofstream
-
ifstream
-
iofstream
C
Correct answer
Explanation
The ifstream class is used to create an object for opening a file to read.
-
Name the file, open the file and close the file
-
Open the existing file, read/write the file and close the file
-
Open the file, read the file and write a file
-
Create a file, open the file and close the file
B
Correct answer
Explanation
The steps to process a file in C++ are
- Open the file
- Read or write the file
- Close the file
-
tellme() and giveme()
-
tellp() and tellg()
-
put() and get()
-
seekp() and seekg()
B
Correct answer
Explanation
The current position of the file pointer is given by the tellp() and tellg() member functions of ostream and istream respectively.
D
Correct answer
Explanation
The open mode in, out and ate are the valid modes for reading, writing and appending respectively. There is no any ale mode in C++.
A
Correct answer
Explanation
The open mode “ate” is used to open the file by position the file pointer at the end of file.
-
filepointer.seekg(0L,ios::start);
-
filepointer.seekg(1L,ios::beg);
-
filepointer.seekg(0L,ios::beg);
-
filepointer.seekg(0L,io::beg);
C
Correct answer
Explanation
The function seekg() is used to position the file pointer at a specific place.
So, the statement filepointer.seekg(0L,ios::beg); positions the file pointer at the beginning of the file.
-
ios::in
-
ios::out
-
ios::noreplace
-
ios::nocreate
D
Correct answer
Explanation
The file opening mode ios::nocreate gives the error if the file does not already exist.
-
if(f1.open()) { .......... }
-
if(f1.isopen) { ........... }
-
if(f1.is_open()) { ............. }
-
If(f1.is_open) { ................ }
C
Correct answer
Explanation
The correct format to check whether a file stream f1 was successfully opened or not is as follows:
if(f1.is_open())
{
..................
}
-
get(ch) function
-
geline() function
-
extraction operator
-
open() function
D
Correct answer
Explanation
The get(ch), getline() and extraction operators can be used to read a text file. But open() function can be used only to open the file in a particular mode.
-
Dynamic Hashing
-
Linear Probing
-
Chaining
-
Extendible Hashing
-
Linear Hashing
A
Correct answer
Explanation
Here, the storage space allocated to the file can be increased or decreased without recognizing the whole files.
-
Sequential
-
Random
-
Indexed
-
None of these
A
Correct answer
Explanation
Sequential access mode read or write the next record or next n bytes of the file.