C 语言实例 - 数组拷贝
C 语言教程
· 2019-02-21 06:57:59
将一个数组复制给另外一个数组:
实例
#include <stdio.h>
int main() {
int original[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0};
int copied[10];
int loop;
for(loop = 0; loop < 10; loop++) {
copied[loop] = original[loop];
}
printf("元素数组 -> 拷贝后的数组 \n");
for(loop = 0; loop < 10; loop++) {
printf(" %2d %2d\n", original[loop], copied[loop]);
}
return 0;
}
输出结果为:
元素数组 -> 拷贝后的数组 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 0 0
点击查看所有 C 语言教程 文章: https://www.codercto.com/courses/l/17.html
The Algorithmic Beauty of Plants
Przemyslaw Prusinkiewicz、Aristid Lindenmayer / Springer / 1996-4-18 / USD 99.00
Now available in an affordable softcover edition, this classic in Springer's acclaimed Virtual Laboratory series is the first comprehensive account of the computer simulation of plant development. 150......一起来看看 《The Algorithmic Beauty of Plants》 这本书的介绍吧!