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

Multiple choice technology programming languages
  1. Sequential & Indexed

  2. Indexed & Relative

  3. Relative

  4. NONE

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Indexed files allow both sequential access (reading records in order) and random access (reading records by key) because they maintain an index structure. Relative files also support both access modes - records can be accessed sequentially or by their relative record number. Sequential files only support sequential access, not random. Therefore, only Indexed and Relative files support both modes.

Multiple choice technology programming languages
  1. RELATIVE files

  2. SEQUENTIAL files

  3. INDEXED files

  4. NONE OF THESE

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The DELETE statement is only supported for files with relative or indexed organization. Sequential files do not support the DELETE statement because their structure requires sequential write and read access. Thus, sequential files are the only file type listed from which records cannot be deleted using this statement.

Multiple choice technology programming languages
  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

TANDEM COBOL85 follows standard COBOL file handling rules where files should be explicitly closed before program termination. While some systems may auto-close files on STOP RUN, best practice and the language specification require explicit CLOSE statements for proper resource management and data integrity.

Multiple choice technology programming languages
  1. INPUT

  2. OUTPUT

  3. I-O

  4. EXTEND

  5. All of the above

  6. None of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The REWRITE statement updates existing records in a file, which requires the file to be open in input-output (I-O) mode to read and modify the record. Other modes like INPUT or OUTPUT do not allow updates. Opening in INPUT allows only reading, whereas OUTPUT is for writing new files.

Multiple choice technology packaged enterprise solutions
  1. CreateNewVersion

  2. CreateNewAttachment

  3. CreateNewVersionAttachment

  4. EditAttachment

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

EditAttachment is the correct flow action in Pega PRPC for creating new versions of existing file attachments. CreateNewVersion and CreateNewAttachment are not standard flow actions. The EditAttachment action handles versioning by creating a new version when editing an existing attachment.

Multiple choice technology programming languages
  1. Opens a file notes.txt

  2. fails to create a file and displays error

  3. fails to open a file but doesn't display error

  4. Opens a file but not notes.txt

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

On Unix, the path c:\temp\notes.txt is interpreted as a relative filename with literal backslashes - not as a Windows path. The file open call succeeds but creates a file with backslashes in its name, not 'notes.txt' in a temp folder.

Multiple choice technology mainframe
  1. 20 extents on a volume for a sequential file

  2. 26 extents on a volume for a sequential file

  3. 14 extents on a volume for a sequential file

  4. 16 extents on a volume for a sequential file

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

In z/OS DFSMS, a standard sequential dataset (non-extended format) is limited to a maximum of 16 extents per volume. If a sequential file needs to grow beyond 16 extents, it must span across multiple volumes or use extended format.

Multiple choice technology security
  1. Special characters are not used in the filename to keep the file hidden

  2. The existence of the file exceeds 3 seconds

  3. File permissions are not set appropriately

  4. Special characters indicating this is a system file are not used in the filename

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Inadequate permissions allow unauthorized users to access temporary files. Filename conventions or file lifespan do not protect content if the underlying permissions permit read access.

Multiple choice technology security
  1. Security is handled at OS level by giving only read level privilege so no need to put an extra check here.

  2. Only problem here is that fileName may not be syntactically incorrect so it should be validated before using it in the function.

  3. This code can lead to information disclosure attack

  4. Java provides enough security by default for IO operations so this code is not vulnerable.

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The code accepts a filename parameter from the user without any validation and passes it directly to FileInputStream. This is vulnerable to path traversal attacks where an attacker can supply paths like ../../etc/passwd to read arbitrary files on the system. OS-level read privileges do not prevent path traversal - they only restrict which files can be read, not how they are accessed.

Multiple choice technology security
  1. Since the file name is hard coded, fopen() will fail if the file already exists.

  2. 0600 is not a secure option. The parameter 0600 should be changed to 0666

  3. Attackers can exploit by creating a symboling link /tmp/cache_data that points to a system file.

  4. Attackers can exploit the application's cache by writing directly to /tmp/cache_data

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The code opens /tmp/cache_data with O_TRUNC in a world-writable directory (/tmp), creating a race condition vulnerability. Attackers can create a symbolic link at /tmp/cache_data pointing to sensitive system files (e.g., /etc/shadow) before the daemon runs. When the daemon opens the file, it truncates and writes to the target of the symlink, potentially damaging critical system files. This is a classic TOCTOU (time-of-check-time-of-use) symlink attack.

Multiple choice technology security
  1. Special characters are not used in the filename to keep the file hidden

  2. The existence of the file exceeds three seconds

  3. File permissions are not set appropriately

  4. Special characters indicating this is a system file are not used in the filename

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

To solve this question, the user needs to understand the concept of file security and how confidential data can be exposed.

Option A is incorrect because using special characters in the filename does not necessarily keep the file hidden or secure. The filename is just a label for the file and does not affect the file's contents or accessibility.

Option B is incorrect because the amount of time the file exists does not determine the file's security. Even temporary files can contain confidential data, and it is essential to ensure that they are adequately secured.

Option D is also incorrect because using special characters in the filename does not necessarily indicate that the file is a system file or secure. The filename is just a label and does not affect the file's contents or accessibility.

Option C is correct because file permissions play a crucial role in determining who can access or modify a file. If the permissions are not set appropriately, anyone can access the file, including unauthorized users, resulting in confidential data exposure.

Therefore, the answer is: C.

Multiple choice technology security
  1. Picture files

  2. Music files

  3. Video files

  4. All of the above

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Steganography is the practice of concealing a message within another file. Because digital picture, music, and video files contain redundant or unused bits, any of them can serve as a carrier to hide secret messages. Therefore, all of the listed formats are viable transmission mediums.

Multiple choice
  1. Bin

  2. App_Code

  3. App_Data

  4. App_Database

  5. App_Browser

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The App_Data folder is used as a data storage for the web application. It can store files such as .mdf, .mdb and XML. It manages all of our application's data centrally. It is accessible from anywhere in your web application.