Finshell interview question

Question was based on the assignment.