(a) fopen("sample.txt", "r");
Description: The fopen() function accepts two arguments: $filename and $mode. The $filename represents the file to be opended and $mode represents the file mode for example, read-only, read-write, write-only etc. The "r" mode opens the file in read-only mode. It places the file pointer at the beginning of the file.