Home > Unix Programming > Quizzes > Unix Basics Practice Test: File Handling System Calls
Unix Basics Practice Test: File Handling System Calls
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 0% Most missed: “Which library function is used for printing error messages?”
File handling system calls are a subset of system calls that are specifically used for managing files. These system calls allow processes to create, open, read, write, and delete files. They also allow processes to get information about files, such as their size, permissions, and creation date. Some of the most common file handling system calls include: open(): : Opens a file for reading or writing. read(): : Reads data from a file. write(): : Writes data to a file. close(): : Closes a file. unlink(): : Deletes a file. stat(): : Gets information about a file. File handling system... Show more
Unix Basics Practice Test: File Handling System Calls
Time left 00:00
25 Questions

1. chmod and fchmod calls are used for changing file permissions.
2. For removing a link, ____ is used.
3. What is the significance of errno 13?
4. perror also uses error number to print the error messages.
5. Directories can also be opened, read and written in the same way as regular files.
6. Which library function is used for printing error messages?
7. Which of the following is not a valid symbolic constant?
8. S_IFxxx macros are used for checking the file types.
9. The vnode table is also called _____
10. What is the symbolic constant for errno 2?
11. The file table contains _________
12. A super user can use ___ call for creating a directory.
13. For checking a file access rights, ___ system call is used.
14. ____ system call is used for renaming a file, directory or symbolic link.
15. Which of the following system call uses file descriptor as an argument?
16. Which of the following is used with access call for checking the owner’s permissions?
17. For creating and removing directories, which of the following system calls are used?
18. Which of the following system calls performs the action of cd command?
19. The file descriptor table contains all file descriptors for a process.
20. For changing the time stamps, _____ system call is invoked.
21. How many data structures does the kernel maintain in memory that contain information about an open file?
22. Both the owner and group owner can be changed by ____ call.
23. Which of the following macro returns true if the file type is a directory?
24. For creating a hard and symbolic link, which system calls are used?
25. System calls and library functions are same.