250+ TOP MCQs on File Management 1 and Answers

Here is a listing of Linux / Unix Technical Interview Questions & Answers for experienced IT professionals as well as fresh engineering graduates. These questions can be attempted by anyone focusing on Linux Development and Systems programming.

1. Each process has unique
a) fd table
b) file table
c) inode table
d) data block table
Answer: a
Clarification: None.

2. File descriptor table indexes which kernel structure?
a) struct file
b) strruct fs_struct
c) files_struct
d) struct inode
Answer: a
Clarification: None.

3. What is the default number of files open per user process?
a) 0
b) 1
c) 2
d) 3
Answer: d
Clarification: None.

4. The file system information is stored in
a) Boot block
b) Super Block
c) Inode Table
d) Data Block
Answer: b
Clarification: None.

5. Switch table is used by
a) device special file
b) directory file
c) fifo
d) link file
Answer: a
Clarification: None.

6. What is the use of fcntl function?
a) locking a file
b) reading the file descriptor flag
c) changing the file status flag
d) all of the mentioned
Answer: d
Clarification: None.

7. Which function can be used instead of the dup2 to duplicate the file descriptor?
a) read()
b) open()
c) stat()
d) fcntl()
Answer: d
Clarification: None.

8. printf() uses which system call
a) open
b) read
c) write
d) close
Answer: c
Clarification: None.

9. read() system call on success returns
a) 0
b) -1
c) number of character
d) none
Answer: c
Clarification: None.

10. Which system call is used to create a hard link?
a) hardlink
b) link
c) symlink
d) ln
Answer: b
Clarification: None.

11. namei() is
a) ANSI C library function
b) C library function
c) System call
d) kernel routine
Answer: d
Clarification: None.

12. dup2(1,0)
a) closes the stdout and copies the stdin descriptor to stdout
b) closes the stdin and copies the stdout descriptor to stdin
c) will produce compilation error
d) None of the mentioned
Answer: b
Clarification: None.

Leave a Reply

Your email address will not be published. Required fields are marked *