以下程序的功能是:借助指针变量找出数组元素中的最大值及其元素的下标值。请填空。 #
问题:
以下程序的功能是:借助指针变量找出数组元素中的最大值及其元素的下标值。请填空。
#include<stdio.h>
main()
int a[10],*p,*s;
for(p=a;P-a<10;p++)scanf("%d",p);
for(p=a,s=a;p-a<10;p++)if(*p>*s)s=______;
printf("index=%d\n",s-a);
以下程序的功能是:借助指针变量找出数组元素中的最大值及其元素的下标值。请填空。
#include<stdio.h>
main()
int a[10],*p,*s;
for(p=a;P-a<10;p++)scanf("%d",p);
for(p=a,s=a;p-a<10;p++)if(*p>*s)s=______;
printf("index=%d\n",s-a);