Algorithm to find largest and smallest number in an array in c. Method for searching element in an array with posi.