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

Multiple choice technology mainframe
  1. WORKING-STORAGE

  2. FILE SECTION

  3. CONTROL SECTION

  4. LINKAGE SECTION

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

In COBOL, Sort Description (SD) entries, which define the structure of sort work files, must be declared in the FILE SECTION of the DATA DIVISION. Other sections like WORKING-STORAGE, LINKAGE, or non-existent sections like CONTROL do not hold file or sort descriptions.

Multiple choice technology mainframe
  1. RECORD NOT FOUND

  2. AT END

  3. DUPLICATE RECORD

  4. END OF FILE

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

In COBOL, FILE STATUS = 10 indicates end-of-file condition. The AT END clause is specifically designed to handle this situation, allowing the program to execute a block of code when all records have been processed, making it a cleaner alternative to explicitly checking FILE STATUS.

Multiple choice technology mainframe
  1. WORKING-STORAGE

  2. FILE SECTION

  3. CONTROL SECTION

  4. LINKAGE SECTION

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

In COBOL programming, the short description of a file is typically given in the FILE SECTION.

Option A) WORKING-STORAGE - This section is used to define variables and data items that are used within the program for temporary storage or calculations. Option B) FILE SECTION - This section is used to define the files that the program will read from or write to. It includes the short description of the file, along with details such as the file organization, access mode, and record structure. Option C) CONTROL SECTION - This section is used to define the logic and control structures of the program, such as the PROCEDURE DIVISION and the various paragraphs, sections, and statements within it. Option D) LINKAGE SECTION - This section is used to define data items that are passed between programs in a COBOL program.

The correct answer is B) FILE SECTION. This is where the short description of a file is typically given in COBOL programming.

Multiple choice technology operating systems
  1. My Documents

  2. My Computer

  3. Start: Search

  4. Start: Run

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

In Windows XP and earlier versions, clicking Start and then selecting Search opens the Search Companion where you can search for files and folders. My Documents and My Computer are just folders/locations, not search interfaces. Start > Run opens the Run dialog for executing commands, not for searching files.

Multiple choice technology
  1. <!--include file="time.inc"-->

  2. <?php include_file("time.inc"); ?>

  3. <?php require("time.inc"); ?>

  4. <% include file="time.inc" %>

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

In PHP, require() is used to include a file, and the file will cease processing if it cannot be found - this is the correct syntax shown in option C. Option A shows HTML comment syntax, option B uses a non-existent function include_file(), and option D shows ASP-style syntax which is not standard PHP.

Multiple choice technology operating systems
  1. type filename

  2. file filename

  3. desc filename

  4. .filename

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

The 'file' command examines file contents to determine and report the file type, unlike simple extensions. It works by analyzing magic numbers and file headers. Options A, C, and D are not valid Unix commands for file type detection.

Multiple choice technology operating systems
  1. ls -lrt file1

  2. ls -lR file1

  3. find . -s file1

  4. find . -name file1

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

The find command is used to search directories recursively. The -name option specifies the filename pattern to search for, making find . -name file1 correct. ls commands list files but do not perform recursive file-matching searches, and find . -s is invalid syntax for this purpose.

Multiple choice technology operating systems
  1. if the output of “cmp -s file1 file2” is not zero

  2. if the output of “cmp -s file1 file2” is zero

  3. if the output of “cmp -s file1 file2” is one

  4. if the output of “cmp -diff file1 file2” is zero

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

The cmp utility compares two files byte-by-byte. The -s option runs it silently, returning an exit status of 0 if the files are identical, and 1 if they differ. Other options like -diff are invalid, and a non-zero or 1 exit status indicates differences or errors.

Multiple choice technology operating systems
  1. &> filename

  2. 1> filename

  3. 2> /dev/null

  4. 2> filename

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

In shell redirection, file descriptor 2 represents stderr (standard error), so 2> filename redirects error messages to the specified file. Option A's &> redirects both stdout and stderr together, while option B's 1> only redirects stdout. Option C redirects errors to /dev/null, discarding them rather than saving to a file.

Multiple choice technology
  1. File and Data Sets preserve partitioning.

  2. File and Data Sets are stored in internal format.

  3. File and Data Sets contain header file and data files.

  4. File and Data Sets are readable by external applications.

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

Both File Sets and Data Sets preserve partitioning metadata and consist of a header file plus data files. However, File Sets are readable by external applications (text format), while Data Sets use internal DataStage format and are not externally readable. Option B incorrectly states both are internal.

Multiple choice technology
  1. File sets are partitioned.

  2. File sets are unpartitioned.

  3. File sets are stored as a single file.

  4. File sets are readable by external applications.

  5. File sets are stored as header file and data files.

Reveal answer Fill a bubble to check yourself
A,D,E Correct answer
Explanation

File Sets are partitioned (A), stored as a header file plus separate data files (E), and are readable by external applications since they use text format (D). They are not unpartitioned (B is wrong) and not stored as a single file (C is wrong).