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
-
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.
-
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.
-
Direct/Random access
-
Sequential access
-
Indexed sequential access
-
Both (2) and (3)
-
None of the above
C
Correct answer
Explanation
In Indexed sequential access, an index is created for each file to search sequentially the records and the pointer is used to access the file directly.
-
Creating a file
-
Writing a file
-
Repositioning within a file
-
Truncating a file
-
Deleting a file
D
Correct answer
Explanation
This operation on file is the one in which file attributes remain the same, but the file has a reduced size because a user deletes information in the file.
-
Type
-
Location
-
Protection
-
Size
-
Time date and user ID
C
Correct answer
Explanation
This attribute of a file contains control information for user access.
-
Single level directory
-
Two level directory
-
Tree structured directories
-
Three level directory
-
Four level directory
A
Correct answer
Explanation
This directory structure in the file system is the one in which all files reside in one and the same directory.
-
Directory files
-
Ordinary files
-
Special files
-
Structure files
-
None of the above
A
Correct answer
Explanation
These type of files have information about the list of files in operating system
-
invoice data entry is online
-
payment recording is done in a batch code
-
inquiry concerning payable are to be answered online
-
last record points to the first record
C
Correct answer
Explanation
Online inquiry requires random access storage that can quickly retrieve any record without sequential searching. When users need instant answers about payable accounts, direct access storage is essential. Batch processing can use sequential storage, but online inquiry demands immediate access to specific records.
-
r, rw
-
rws, rwd
-
only rw
-
r, rw, rws, rwd
-
none of the above
D
Correct answer
Explanation
Following are the accesses provided by RandomAccessFile classr:
r, rw, rws, rwd