Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

array value from user c

#include <stdio.h>
int main(void)
{
int size, i;
printf("Enter the size of the arrays:
");
scanf("%d", &size);

int arr1[size];
printf("Enter the elements of the array:
");
for (i = 0; i < size; i++) {
    scanf_s("%d", arr1[size]);
}
printf("The current array is:
 %d", arr1[i]);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #array #user
ADD COMMENT
Topic
Name
8+6 =