1.

Which of the following system calls performs the action of cd command?(a) chdir(b) fchdir(c) mkdir(d) chdir and fchdirThis question was addressed to me at a job interview.This interesting question is from File handling System Calls topic in chapter System Programming I – Files of Unix

Answer»

Right option is (d) chdir and fchdir

Explanation: There are two SYSTEM CALLS that PERFORM the action of cd COMMAND. They are chdir and fchdir which uses pathname and a file descriptor RESPECTIVELY as an argument.



Discussion

No Comment Found

Related InterviewSolutions