Microchip Technology Interview Question

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