C语言一维数组赋值方法答:比如下面的代码,通过memcpy函数来实现数据的复制,以实现数组赋值的功能。include <stdio.h>#include <stdlib.h>#include <string.h>int main(){int inx;int a[10] = {1,2,3,4,5,6,7,8,9,10};int b[5];//复制4个元素,b[4]将是随机值memcpy(b, a, 4 * sizeof(int));for (...
C语言如何把数组a赋值给数组b.答:int main(){ int a[20] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}; int b[20] = {2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40}; memcpy(b, a, 20 * sizeof(int)); return 0;} ...