반응형
#include <stdio.h>
#define SIZE 10
void array_copy(int *A, int *B, int size);
int main(void) {
int A[SIZE] = { 1,2,3,0,0,0,0,0,0,0 };
int B[SIZE] = { 0 };
array_copy(A, B, SIZE);
return 0;
}
void array_copy(int *A, int *B, int size) {
int i;
printf("배열 B:");
for (i = 0; i < size; i++) {
B[i] = A[i];
printf("%d ", B[i]);
}
}
'프로그래밍 C' 카테고리의 다른 글
쉽게 풀어쓴 C언어 익스프레스 프로그래밍 5번 rearranged version (0) | 2020.01.07 |
---|---|
쉽게 풀어쓴 C언어 익스프레스 10장 프로그래밍 4번 (0) | 2020.01.07 |
쉽게 풀어쓴 C언어 익스프레스 11장 프로그래밍 4번 (0) | 2019.11.14 |
쉽게 풀어쓴 C언어 익스프레스 11장 프로그래밍 3번 (0) | 2019.11.14 |
쉽게 풀어쓴 C언어 익스프레스 11장 프로그래밍 2번 (0) | 2019.11.14 |