min and max element in an array in c