C语言,编写程序,通过指针操作,比较两个有序数组中的元素,输出两个数组...答:c语言指针2个数组查询比较代码如下:include <stdio>int main(){ int *lpa,*lpb; int a[100],b[100],alen,blen,i,j; printf("输入数组a长度:\n"); scanf("%d",&alen); printf("输入%d个有序数据给数组a\n",alen); for(i=0;i<alen;i++) scanf("%d",&a[i...
用c语言用指针变量作形参,数组名作实参,求十个整数的平均值?答:代码文本:include "stdio.h"double f(int *p,int n){ int s,i;for(s=i=0;i<n;s+=p[i++]);return s/(n+0.0);} int main(int argc,char *argv[]){ int a[10]={20,1,45,91,77,40,9,4,8,10};printf("The average are %g\n",f(a,10));return 0;} ...