Operating System MCQs with Answers
Practice important Operating System MCQs with answers and explanations.
Multiple Choice Questions
Q1131: In UNIX, what is the function of the 'lseek' system call?
- A: Repositions within a file
- B: Deletes a file
- C: Writes to a file
- D: Opens a file
View Answer
A
Q1132: Which file type in UNIX allows communication between processes running on the same system?
- A: Symbolic link
- B: FIFO
- C: Socket
- D: Directory
View Answer
B
Q1133: Which directory structure allows each user to have a separate directory?
- A: Single-level directory
- B: Tree directory
- C: Two-level directory
- D: Multi-level directory
View Answer
C
Q1134: The UNIX command to create a new directory is __________.
- A: mkdir
- B: rmdir
- C: cd
- D: ls
View Answer
A
Q1135: Which of the following file access methods allows reading and writing records in no particular order?
- A: Sequential Access
- B: Direct Access
- C: Index Access
- D: Binary Access
View Answer
B
Q1136: What does the 'readdir' function do in UNIX?
- A: Opens a file
- B: Reads a directory entry
- C: Closes a directory
- D: Changes a directory path
View Answer
B
Q1137: In UNIX, the absolute pathname always starts with the __________ directory.
- A: Home
- B: Current
- C: Root
- D: Parent
View Answer
C
Q1138: Which of the following is an example of a relative pathname in UNIX?
- A: /etc/passwd
- B: /home/user/documents
- C: ~/courses/cs604
- D: /usr/bin
View Answer
B
Q1139: The system call used to delete a file in UNIX is __________.
- A: unlink
- B: remove
- C: delete
- D: rmdir
View Answer
A
Q1140: Which of the following file types in UNIX corresponds to character-oriented devices?
- A: Character-special file
- B: Block-special file
- C: Directory
- D: Socket
View Answer
B