Find the minimum and maximum element in an array in c. Run loop from first to last array element i.