int main(){ int a[10]={1,2,3,4,5,6,7,8,9,0};int *p = a;int i = 0;int max = 0;while(i < 10){ if(*(p+max) < *(p+i))max = i;i++;} printf("最大元素为%d,位置是%d\n",a[max],max);}