CGI Interview Question

irst round was simple, but second was really technical with programming question