Cognizant Interview Question

Pattern problem in c and DBMS