CGI interview question

Basic OOPS questions and logical reasoning.