File System MCQ Quiz - Objective Question with Answer for File System - Download Free PDF

Last updated on May 6, 2025

Latest File System MCQ Objective Questions

File System Question 1:

Which of the following files support MS-DOS?

  1. shell files
  2. batch files
  3. Both shell and batch files
  4. More than one of the above
  5. None of the above

Answer (Detailed Solution Below)

Option 2 : batch files

File System Question 1 Detailed Solution

The correct answer is option 2.

Concept:

DOS is an abbreviation for Disk Operating System. It is a single-user (no security), a single-process system that provides the user application entire control of the machine. It uses less memory and energy than Unix.

  • DOS is a single-tasking operating system.
  • It is not case-sensitive.
  • It has batch files.

Explanation:

Batch files allow MS-DOS and Microsoft Windows users to write instructions that will execute in the order they were written for the purpose of automating frequently done operations.

  • UNIX supports shell files.

Hence the correct answer is batch files.

File System Question 2:

Which of the following is not a limitation of file system?

  1. Data Redundancy
  2. Data Inconsistency
  3. Data dependence
  4. Storing Space

Answer (Detailed Solution Below)

Option 4 : Storing Space

File System Question 2 Detailed Solution

The correct answer is Storing Space.

key-point-image Key Points

  • Data Redundancy: File systems often lead to redundancy where the same data is stored multiple times, leading to wastage of storage space.
  • Data Inconsistency: Due to redundancy, changes made in one file may not be reflected in others, leading to inconsistencies.
  • Data Dependence: In file systems, data is dependent on the application that created it, making it difficult to access data from different applications.
  • Storing Space: While file systems use storage space, it is not considered a limitation as it is a basic requirement for data storage. Hence, storing space is not a limitation of file systems.

additional-information-image Additional Information

  • File systems may also face issues related to data integrity and security.
  • They do not support concurrent access effectively, which may lead to data loss or corruption.
  • Unlike databases, file systems lack advanced querying capabilities, making data retrieval less efficient.
  • Modern database management systems (DBMS) are designed to overcome many of the limitations associated with traditional file systems.

File System Question 3:

There are two types of links supported in the NTFS file system, ________________.

  1. soft links and direct linking
  2. hard links and direct linking
  3. hard links and junctions 
  4. soft links and junctions 

Answer (Detailed Solution Below)

Option 3 : hard links and junctions 

File System Question 3 Detailed Solution

The correct answer is: 3) hard links and junctions

Additional Information 

The NTFS (New Technology File System) supports two types of links:

  1. Hard Links – These allow multiple file names to point to the same data on disk. Changes to any of the hard links affect the same underlying file.
  2. Junctions (Reparse Points) – These are used for linking directories across different locations, similar to symbolic links but primarily for directories.

Soft links (symbolic links) are also supported in NTFS but are distinct from junctions.

File System Question 4:

What is the purpose of the 'grep' command in the Linux operating system?

  1. To rename files
  2. To display the calendar
  3. To display system processes
  4. To search for a specific pattern in a file

Answer (Detailed Solution Below)

Option 4 : To search for a specific pattern in a file

File System Question 4 Detailed Solution

Explanation:

The Purpose of the 'grep' Command in the Linux Operating System

Definition: The 'grep' command in Linux (and other Unix-like operating systems) is a powerful utility used for searching plain-text data sets for lines that match a regular expression. The name 'grep' stands for "global regular expression print." This command is widely used for its capability to search for specific patterns within files, making it an essential tool for programmers, system administrators, and users who need to filter text efficiently.

Working Principle: The 'grep' command works by taking a search pattern (provided as an argument) and scanning through the text or files to find lines that contain the pattern. It then outputs the matching lines to the standard output. The search pattern can be a simple string or a more complex regular expression, allowing users to perform sophisticated text searches.

For example, to search for the word "error" in a file named "logfile.txt", you would use the following command:

grep "error" logfile.txt

This command will output all lines in "logfile.txt" that contain the word "error".

Advantages:

  • Highly efficient for searching large files and directories.
  • Supports regular expressions, enabling complex search patterns.
  • Can be combined with other commands using pipes for powerful data processing.
  • Works with various file types, including plain text, logs, code files, and more.

Disadvantages:

  • Regular expressions can be complex and hard to understand for beginners.
  • Output can be overwhelming for very large files if not properly filtered.

Applications: The 'grep' command is commonly used in various scenarios, including:

  • Searching for specific error messages in log files.
  • Filtering code files for particular function names or variables.
  • Extracting specific data from large text files.
  • Combining with other commands to perform complex text processing tasks.

Correct Option Analysis:

The correct option is:

Option 4: To search for a specific pattern in a file.

This option correctly describes the primary purpose of the 'grep' command. It is designed to search for and display lines in a file that match a specified pattern. This capability is invaluable for tasks that require text processing, data extraction, and log analysis.

Additional Information

To further understand the analysis, let’s evaluate the other options:

Option 1: To rename files.

This option is incorrect because renaming files is not the purpose of the 'grep' command. File renaming in Linux is typically done using the 'mv' (move) command. For example, to rename a file named "oldname.txt" to "newname.txt", you would use:

mv oldname.txt newname.txt

Option 2: To display the calendar.

This option is incorrect as well. Displaying the calendar is done using the 'cal' command in Linux. For example, to display the current month's calendar, you would use:

cal

Option 3: To display system processes.

This option is incorrect because displaying system processes is handled by the 'ps' command or the 'top' command. For example, to display currently running processes, you would use:

ps

To display a dynamic real-time view of running processes, you would use:

top

Conclusion:

The 'grep' command is a fundamental utility in the Linux operating system used for searching for specific patterns within files. Its versatility and power make it indispensable for tasks that require efficient text searching and processing. While the other options describe useful commands in Linux, they do not pertain to the primary function of 'grep', which is to search for and display lines that match a given pattern. Understanding the correct use of 'grep' and distinguishing it from other commands is crucial for effective system administration and text processing in Linux.

File System Question 5:

How many child processes will be created by following fork() system call?

fork():

fork():

fork():

fork():

  1. 4
  2. 16
  3. 15
  4. 3

Answer (Detailed Solution Below)

Option 3 : 15

File System Question 5 Detailed Solution

The correct answer is option 3): 15

Key Point

Concept:

Fork system call is used to create a new process also called a child process or new process.

Formula:

With n fork system calls, number of new (child) processes created is 2n – 1.

Explanation:

Here there are 4 fork system calls in the given program.

new process created = 24– 1= 16-1 = 15

Top File System MCQ Objective Questions

Which of the following systems software does the job of merging the records from two files into one?

  1. Security software
  2. Utility program
  3. Networking software
  4. Documentation system

Answer (Detailed Solution Below)

Option 2 : Utility program

File System Question 6 Detailed Solution

Download Solution PDF

A utility program merges the records from two files into one for optimization purposes.

Following are some functions of a Utility software

→ to analyse a system

→ to configure various parts

→ to optimize the functionalities

→ to maintain a computer.

It is used to support the computer infrastructure in contrast to application software, which is aimed at directly performing tasks that benefit ordinary users.

Which of the following is not a valid file extension of an audio file?

  1. .mp3
  2. .rar
  3. .wav
  4. .mid

Answer (Detailed Solution Below)

Option 2 : .rar

File System Question 7 Detailed Solution

Download Solution PDF

The correct answer is option 2.

Concept:

The quality and loss of audio data are determined by the audio format. Many different audio formats are utilized, depending on the application.

The three categories of audio formats are as follows:

Lossy Compressed format:

Different types of lossy compressed formats are,

  • ​PCM(Pulse-Code Modulation),
  • WAV( Waveform Audio File Format) and
  • AIFF(Audio Interchange File Format)

Uncompressed Format:

Different types of Uncompressed formats are,

  • MP3( MPEG-1 Audio Layer 3),
  • AAC (Advanced Audio Coding), and
  • WMA(Windows Media Audio)

Lossless Compressed Format:

Different types of Lossless Compressed formats are,

  • FLAC(Free Lossless Audio Codec),
  • ALAC (Apple Lossless Audio Codec) 
  • MID ( Musical Instrument Digital Interface)
  • WMA(Windows Media Audio)

Explanation:

A RAR file is a type of compressed file that may hold one or more files and directories. Simply described, a Roshal Archive Compressed file is a different format for compressing files and archiving them. RAR files function similarly to ZIP files.

Hence the correct answer is .rar.

What is compaction refers to

  1. a technique for overcoming internal fragmentation
  2. a paging technique
  3. a technique for overcoming external fragmentation
  4. a technique for compressing the data

Answer (Detailed Solution Below)

Option 3 : a technique for overcoming external fragmentation

File System Question 8 Detailed Solution

Download Solution PDF

Concept:

Compaction is the process in which the free spaces are collected in the large memory chunk to make some space available for processes.

  • Compaction - External Fragmentation.
  • Segmentation - Internal Fragmentation.

Explanation:

  • In memory management, swapping creates multiple fragments in the memory because of the processes moving in and out.
  • Compaction refers to combining of all the empty spaces together and processes.
  • Compaction helps to solve the problem of fragmentation, but it requires a lot of CPU time.
  • It moves all the occupied areas of storage to one end and leaves one large free space for incoming jobs, instead of numerous small ones.
  • In compaction, the system also maintains relocation information and it must be performed on each new allocation of job to the memory or completion of job from memory.

Which table is used in MS DOS for linked list allocation?

  1. TLB
  2. Page Table
  3. FAT
  4. Index Table

Answer (Detailed Solution Below)

Option 3 : FAT

File System Question 9 Detailed Solution

Download Solution PDF

The correct answer is option 3.

Key Points

  • At the time of formatting, the FAT is statically allocated. The table is a linked list of entries for each cluster, a contiguous area of disk storage.
  • FAT table is used in MSDOS for linked list allocation
  • The File Allocation Table is used by the file system to define chains of data storage areas associated with a file (FAT). At the time of formatting, the FAT is assigned statically. Each cluster, or contiguous area of disc storage, is represented by a linked list of entries in the table.

Hence the correct answer is FAT.

.doc is a :

  1. Word file
  2. Picture file
  3. Deleted file
  4. Driver file

Answer (Detailed Solution Below)

Option 1 : Word file

File System Question 10 Detailed Solution

Download Solution PDF

Key Points

File extension:

  •  A file extension, or filename extension, is a suffix at the end of a computer file. 
  • It comes after the period and is usually two-four characters long. 
  • If you’ve ever opened a document or viewed a picture, you’ve probably noticed these letters at the end of your file.
Audio Data
  • An audio file format is a file format for storing digital audio data on a computer system.
  • Common Audio File Extensions include MP3, WMA, AAC, WAV, and FLAC.

Image Data.
  • Image file formats are standardized means of organizing and storing digital images.
  • Common Image File Formats: TIFF (.tif, .tiff), Bitmap (.bmp), JPEG (.jpg, .jpeg), GIF (.gif), and PNG (.png)

Video Data
  • video file format is a type of file format for storing digital video data on a computer system.
  • Common Video File Formats: WebM (.webm), Matroska (.mkv), Flash Video(.flv), F4V (.flv), and Vob (.vob)

Important Points Text Data
  • text file is a kind of computer file that is structured as a sequence of lines of electronic text.
  • Common Text File Format:

    • .doc and .docx - Microsoft Word file 
    • .odt - OpenOffice Writer document file 
    • .pdf - PDF file
    • .rtf - Rich Text Format 
    • .tex - A LaTeX document file
    • .txt - Plain text file 
    • .wpd - WordPerfect document

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Therefore, .doc is a word file.

File operations that manipulate the ‘open-count’ maintained for each entry in open file table include:

  1. open, write
  2. read, write
  3. write, close
  4. open, close

Answer (Detailed Solution Below)

Option 4 : open, close

File System Question 11 Detailed Solution

Download Solution PDF

Concept:

Operating system maintains two data structures representing the state of open files: file descriptor table and open file table. When process calls open(), new entry is created in the open file table.

Explanation:

File operations that manipulate the open count maintained for each entry in open file table includes open and close. Open file table stores the information about all the files that are open while the OS is running.

Each entry in the open file table maintains its own read/write pointer for reading and writing purposes. In most of the operating system, open file table is usually a double linked list.

To manipulate the open- count, open() creates a session and returns a handle and close() ends the session and destroys the state.

In a file allocation system, which of the following allocation scheme(s) can be used if no external fragmentation is allowed?

I. Contiguous

II. Linked

III. Indexed

  1. I and III only
  2. II only
  3. III only
  4. II and III only

Answer (Detailed Solution Below)

Option 4 : II and III only

File System Question 12 Detailed Solution

Download Solution PDF

Concept:

Internal fragmentation occurs when a process is allocated more memory than required, few space is left unused.

External fragmentation occurs when blocks of memory are there, but they are non-contiguous and can’t fill the upcoming request for memory.

Explanation:

Linked and indexed allocation are free from external fragmentation but contiguous allocation scheme suffered from external fragmentation problem.

Which of the following extension is not used to save the image file?

  1. .mpg
  2. .gif
  3. .jpg
  4. .bmp

Answer (Detailed Solution Below)

Option 1 : .mpg

File System Question 13 Detailed Solution

Download Solution PDF

File extension:

  • A file extension, or filename extension, is a suffix at the end of a computer file. 
  • It comes after the period and is usually two-four characters long. 
  • If you’ve ever opened a document or viewed a picture, you’ve probably noticed these letters at the end of your file.
Audio Data
  • An audio file format is a file format for storing digital audio data on a computer system.
  • Common Audio File Extensions include MP3, WMA, AAC, WAV, and FLAC.

Image Data.
  • Image file formats are standardized means of organizing and storing digital images.
  • Common Image File Formats: TIFF (.tif, .tiff), Bitmap (.bmp), JPEG (.jpg, .jpeg), GIF (.gif), and PNG (.png)

Video Data
  • A video file format is a type of file format for storing digital video data on a computer system.
  • Common Video File Formats: WebM (.webm), Matroska (.mkv), Flash Video(.flv), F4V (.flv), Vob (.vob),and MPEG video  (.mpeg or .mpg).
Text Data
  • A text file is a kind of computer file that is structured as a sequence of lines of electronic text.
  • Common Text File Format:

    • .doc and .docx - Microsoft Word file 
    • .odt - OpenOffice Writer document file 
    • .pdf - PDF file
    • .rtf - Rich Text Format 
    • .tex - A LaTeX document file
    • .txt - Plain text file 
    • .wpd - WordPerfect document

 

Hence, the .mpg extension is not used to save the image file.

Which of the following is not related to the file-system management functionality of an operating system?

  1. Creation and deletion of files
  2. Creation and deletion of directories
  3. Deciding which process or data to move into and out of memory 
  4. Mapping files onto secondary storage. 

Answer (Detailed Solution Below)

Option 3 : Deciding which process or data to move into and out of memory 

File System Question 14 Detailed Solution

Download Solution PDF

A file is a collection of information stored in computer system.  File management is the process to manipulate or manage the files in computer system. Operating system implements the abstract concept of a file by managing mass storage media such as tapes and disks and devices that control them.

Operating system is responsible for following activities related in connection with file management:

  • Creating and deleting files
  • Creating and deleting directories to organize files
  • Supporting primitives for manipulating files and directories
  • Mapping files onto secondary storage
  • Backing up of files on stable storage media

The _______ becomes the name of the root of the newly mounted directory. 

  1. root of the previous directory 
  2. local directory 
  3. remote directory itself 
  4. None of these 

Answer (Detailed Solution Below)

Option 2 : local directory 

File System Question 15 Detailed Solution

Download Solution PDF

The correct answer is option 2.

Concept:

Directory:

A directory is an area on your computer where you may store files. A hierarchical file system, such as Linux, MS-DOS, OS/2, and Unix, uses directories.

Local directory:

The local directory becomes the name of the root of the newly mounted directory. 

It's a shared information architecture for finding, managing, administering, and organizing commonplace things and network resources, such as volumes, folders, files, printers, users, groups, devices, phone numbers, and other objects.

Hence the correct answer is a local directory.

Get Free Access Now
Hot Links: teen patti sweet teen patti bonus teen patti all app