📜  来自用户的数组值 - C 编程语言代码示例

📅  最后修改于: 2022-03-11 15:04:42.199000             🧑  作者: Mango

代码示例1
#include 
int main(void)
{
int size, i;
printf("Enter the size of the arrays:\n");
scanf("%d", &size);

int arr1[size];
printf("Enter the elements of the array:\n");
for (i = 0; i < size; i++) {
    scanf_s("%d", arr1[size]);
}
printf("The current array is:\n %d", arr1[i]);
}