#include<stdio.h>
main()
{
int a[10]= {7,8,9,1,2,3,4,5,6,5};
int *p, *min=a, *max=a;
for (p=a+1; (p-a)<10; p++)
if (*p < *min)
min = p;
else if (*p > *max)
max = p;
printf("\nmax=%d min=%d\n", *max, *min);
for (--p; p>=a; p--)
printf("%d ", *p);
}
[此贴子已经被作者于2017-1-3 23:48编辑过]