728x90
반응형
#include <stdio.h>
void ShowArayElem(int* param, int len);
int main(void)
{
int arr1[3] = { 1, 2, 3 };
int arr2[5] = { 4, 5, 6, 7 };
ShowArayElem(arr1, sizeof(arr1) / sizeof(int));
ShowArayElem(arr2, sizeof(arr2) / sizeof(int));
return 0;
}
void ShowArayElem(int* param, int len)
{
int i;
for (i = 0; i < len; i++)
{
printf("%d ", param[i]);
}
puts("");
}
728x90
반응형
'Language > C & C++' 카테고리의 다른 글
C++ (0) | 2022.09.24 |
---|---|
Pointer Examples (0) | 2022.09.10 |
User-Defined Type (0) | 2022.09.08 |
Number guessing game in Python 3 and C (0) | 2022.08.31 |
malloc exam (0) | 2022.08.30 |