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
-
truncating a file
-
deleting a file
-
reading a file
-
writing a file
-
creating a file
A
Correct answer
Explanation
This is the operation performed on a file in which the file attributes are not changed but the file has a reduced size because the user deletes information in the file.
-
Single level directory
-
Two-level directory
-
Tree structure directories
-
Directory
-
File
C
Correct answer
Explanation
This directory structure is the one in which directory is a tree of height two with the master file directory at the root having user directories as descendants.
A
Correct answer
Explanation
Pressing this key, facilitates saving the file under a different name.
-
an Audio File Format
-
a Video File Format
-
an Image File Format
-
a Word Document
-
a Portable Document Format
B
Correct answer
Explanation
Actually file name with .WebM extension is a Video File format intended primarily for royalty-free use in the HTML5 video tag. So, this option is correct.
-
ios::in
-
ios::out
-
ios::trunc
-
ios::ate
-
ios::binary
D
Correct answer
Explanation
This file mode is used in C++ to write all the data at the end of the file.
-
file updating
-
file upgrading
-
file restructuring
-
file renewing
A
Correct answer
Explanation
File updating refers to the ongoing process of maintaining files by periodically adding new records, changing existing records, and deleting obsolete records. This is a fundamental operation in file-based systems to ensure data remains current and accurate over time.
-
can be accessed only by one user
-
can be modified by user with correct password
-
is used to hide sensitive information
-
none of the above
A
Correct answer
Explanation
A locked file can be accessed by only one user at a time to prevent concurrent modifications that could corrupt data or cause inconsistencies. Other users must wait for the lock to be released.
-
to update files
-
to print files on paper
-
for data entry
-
none of the above
B
Correct answer
Explanation
A report generator produces formatted output from database data, typically for printing reports. Option A is incorrect because report generators read data rather than update files. Option C refers to data entry which is a separate input function.
-
Log File
-
Master File
-
Specialized File
-
Update File
B
Correct answer
Explanation
A master file contains permanent, relatively stable data that persists over time and serves as the primary reference for an organization's operations. Examples include customer master files, product inventory files, and employee records. Unlike temporary files (logs, updates), master files are perpetual and continuously updated with valid changes rather than being recreated periodically.
-
Stdout and stderr
-
Console and error
-
Stdout and stdio
-
Stdio and stderr
-
Errout and conout
A
Correct answer
Explanation
Standard C defines three predefined FILE pointers: stdin, stdout, and stderr. Option A correctly identifies stdout and stderr. 'Console', 'error', 'stdio', 'errout', and 'conout' are not standard predefined FILE pointers in C.
-
f == EOF
-
feof( f )
-
eof( f )
-
f == NULL
-
!f
B
Correct answer
Explanation
In standard C input/output library operations, feof(f) is the correct function used to check whether the end-of-file indicator has been set for the given file stream. EOF is an integer macro value returned by reading functions rather than a stream condition check macro.
-
clearerr()
-
fseek()
-
ferror()
-
feof()
-
setvbuf()
A
Correct answer
Explanation
clearerr() resets both the EOF and error indicators on a stream, allowing further I/O operations. fseek() only clears EOF on some implementations, not errors. feof() and ferror() only test conditions. setvbuf() controls buffering. Only clearerr() explicitly resets error/EOF states.
-
fileread()
-
getline()
-
readfile()
-
fread()
-
gets()
D
Correct answer
Explanation
In standard C I/O operations, fread() is designed to read a specified number of elements of a certain size from a given file stream into a buffer.
-
FILE *f = fwrite( test.bin, b );
-
FILE *f = fopen ( test.bin, w );
-
FILE *f = fopen( test.bin, wb );
-
FILE *f = fwriteb( test.bin );
-
FILE *f = fopen( test.bin, bw );
-
math.h
-
stdlib.h
-
stdio.h
-
string.h
C
Correct answer
Explanation
FOPEN_MAX means the number of files that can be opened by a program at any point of time and is defined in stdio.h. Hence, it is the correct answer.