Cognizant Interview Question

Gave some program to write second largest number in array. Some dbms n os concepts questions.