20 lines
340 B
C
20 lines
340 B
C
|
#include <stdio.h>
|
||
|
#include <string.h>
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
|
||
|
int source[10] = {1,2,3,4,5,6,7,8,9,10};
|
||
|
int destination[10];
|
||
|
|
||
|
memmove(destination, source, sizeof(int) * 10);
|
||
|
|
||
|
for (int i = 0; i<10; i++)
|
||
|
printf("destination[%d]=%d\n", i, destination[i]);
|
||
|
|
||
|
for (int i= 0; i <10; i++)
|
||
|
printf("source[%d]=%d\n", i, source[i]);
|
||
|
return 0;
|
||
|
}
|
||
|
|