Computer Knowledge
Computer File Systems
1,516 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
-
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.
A
Correct answer
Explanation
JPEG stores bitmap images in compressed format.
-
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.
-
accessed by only one user
-
modified by user with correct password
-
used to hide sensitive information
-
none of these
A
Correct answer
Explanation
A locked file can only be accessed by the single user or process that holds the lock. This exclusive access prevents other users from reading, modifying, or accessing the file until the lock is released. Locking is a fundamental mechanism for protecting data integrity when files are being used by multiple concurrent users or processes.
-
Log file
-
Master file
-
Specialised file
-
Update file
B
Correct answer
Explanation
In file organization systems, a master file contains permanent or semi-permanent data that changes slowly over time. Log files record activities, specialized files serve specific purposes, and update files contain temporary changes. The perpetual file is the master file as it maintains the core persistent data.
-
seek()
-
getFilePointer()
-
length()
-
none of these
B
Correct answer
Explanation
This method in Random Access Files return the current location of the file pointer.
-
list
-
thumbnails
-
details
-
icon
C
Correct answer
Explanation
Details view in Windows Explorer displays multiple columns of metadata for each file, including file size, modification date, file type, and other attributes. List view only shows names, thumbnails shows previews, and icon view uses large icons without details.
-
an open folder
-
the folder contains subfolders
-
a text file
-
a graphics file
B
Correct answer
Explanation
In Windows Explorer's tree view, a plus (+) sign (or triangle) next to a folder indicates that it contains subfolders and can be expanded to show them. Once expanded, it changes to a minus (-) sign, and if empty, it has no sign.
-
A file is a collection of related pieces of information stored together for easy reference.
-
Files can be generated from an application.
-
Files are stored in RAM.
-
Files should be organized in folders.
C
Correct answer
Explanation
Files are stored on secondary storage devices like hard disks or SSDs for permanent retention, not in RAM. RAM is volatile memory that loses data when power is cut, making it unsuitable for permanent file storage.
-
maintain pages of documents that are being spooled to the printer
-
hold a program's data or instructions in virtual memory when it can't fit in RAM
-
prevent thrashing in a multitasking environment
-
allow multiple print jobs to print their pages out simultaneously
B
Correct answer
Explanation
A swap or page file extends virtual memory by holding program data and instructions that don't fit in physical RAM. When RAM is full, the OS moves less-used pages to disk, retrieving them when needed. This prevents crashes when memory demands exceed physical RAM. Option A refers to print spooling, C describes a consequence of insufficient memory, and D is about printer queues.
-
Files may share the same name or the same extension but not both.
-
Every file in the same folder must have a unique name.
-
File extension is another name for file type.
-
The file extension comes before the dot (.) followed by the file name.
-
None of these
D
Correct answer
Explanation
In standard file naming conventions, the file name comes before the dot (.) and the extension comes after it (for example, 'document.txt' where 'document' is the name and '.txt' is the extension). Option D incorrectly reverses this by claiming the extension comes before the dot.
-
ios::app
-
ios::trunc
-
ios::cur
-
ios::ate
-
none of the above
C
Correct answer
Explanation
ios::cur. This parameter is used with seekg() or seekp() function which defines current position of the pointer.
-
Sequential access
-
Indexed sequential access
-
Direct/Random access
-
All of the above
-
None of the above
C
Correct answer
Explanation
This file access mechanism has address for each file to access it directly to read or write.