Microchip Technology interview question

Write a function to find the max value in an array.