File System - Study Mode

[#16] Which one of the following function outputs the contents of a string variable to the specified resource?
Correct Answer

(B) fwrite()

[#17] Which function sets the file filename’s last-modified and last-accessed times?
Correct Answer

(C) touch()

Explanation

Solution: Its prototype is int touch(string filename [, int time [, int atime]]). It returns TRUE on success or FALSE on error.

[#18] Which function is useful when you want to output the executed command’s result?
Correct Answer

(D) system()

[#19] Which one of the following function reads a directory into an Array?
Correct Answer

(A) scandir()

Explanation

Solution: It returns an array consisting of files and directories found in directory or returns FALSE on error.