Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - The function of this program is to return the contents filled in the subscript space where the minimum value is located in the integer of length n pointed by the formal parameter P.
The function of this program is to return the contents filled in the subscript space where the minimum value is located in the integer of length n pointed by the formal parameter P.
int fun(int *p,n)

{

int i,j;

j = 1; //subscript initialization

for(I = 0; I & ltn;; i++)

if(p[I]& lt; p[j])j = I; //A smaller subscript with a smaller value was encountered.

Return j; //Returns the smallest subscript.

}