#include <stdio.h>
void ary_copy(int a[], const int b[], int n)
{
while (n--)
{
a[n] = b[n];
}
}
int main(void)
{
int a[3];
int b[] = { 1,2,3 };
ary_copy(a, b, 3);
for (int i = 0; i < 3; i++)
printf("a[%d] = %d\n", i, a[i]);
return 0;
}
'TEST > 자료구조와 함께 배우는 알고리즘 입문(C언어)' 카테고리의 다른 글
<2> Q10. 자료구조와 함께 배우는 알고리즘 입문 (C언어) (0) | 2020.06.28 |
---|---|
<2> Q9. 자료구조와 함께 배우는 알고리즘 입문 (C언어) (0) | 2020.06.28 |
<2> Q7. 자료구조와 함께 배우는 알고리즘 입문 (C언어) (0) | 2020.06.28 |
<2> Q6. 자료구조와 함께 배우는 알고리즘 입문 (C언어) (0) | 2020.06.28 |
<2> Q5. 자료구조와 함께 배우는 알고리즘 입문 (C언어) (0) | 2020.06.28 |