HW6
Write a snippet of C code that uses the system call we discussed in class to open a file named “hello.c” for reading.
What is the full path of this file if the current working directory of the process is
/tmp/?What can you pass to the system call to tell the kernel to create the file if it doesn’t exist already (hint: see
man 2 open).What might it mean if the error code is
ENOENT?