Q2 Software interview question

Write a program to get the second max value