Cognizant interview question

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