Cloudera interview question

Q Write code on file handling