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://codercto.com/courses/l/17.html
Head First Rails
David Griffiths / O'Reilly Media / 2008-12-30 / USD 49.99
Figure its about time that you hop on the Ruby on Rails bandwagon? You've heard that it'll increase your productivity exponentially, and allow you to created full fledged web applications with minimal......一起来看看 《Head First Rails》 这本书的介绍吧!