1.

Which of the following system call is used for opening or creating a file?(a) read(b) write(c) open(d) closeThe question was posed to me in an interview.I need to ask this question from System Calls Basics topic in portion System Programming I – Files of Unix

Answer»

The correct ANSWER is (C) open

Best explanation: To read or write to a FILE, we first need to open it. For this purpose, open SYSTEM call is USED. Open has two forms ; the first forms assumes that the file already exists and the second form creates the file if it doesn’t.



Discussion

No Comment Found

Related InterviewSolutions