java数组找出重复元素 C语言,怎样实现不确定元素个数的数组的数据输入?

C语言,怎样实现不确定元素个数的数组的数据输入?Int n,iint*a,*B,*cprintf(“请输入数组大小:”)scanf(%d”,&n)a=(Int*)malloc(sizeof(In

C语言,怎样实现不确定元素个数的数组的数据输入?

Int n,iint*a,*B,*cprintf(“请输入数组大小:”)scanf(%d”,&n)a=(Int*)malloc(sizeof(Int)*n)B=(Int*)malloc(sizeof(Int)*n)C=(Int*)malloc(sizeof(Int)*n)printf(“请输入数组a的数据:”)for(I=0I<ni){scanf(%d“,&A[i])}printf(“please input data of array B:”)fflush(stdin)for(i=0I<ni)){scanf(%d”,&B[i])}for(i=0I<ni){C[i]=a[i]B[i]}printf(“n array C:”)for(i=0I<ni){printf(“n%d”,C[i])}}