第一种–把提前准备好的数组内容随机赋值给新的空数组中 #include<stdio.h> #include <stdlib.h> //srand(), rand() #include <time.h> //time() #include <conio.h>