Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

C - program to create 1D array

//C - program to create 1D array using data taken from user

#include <stdio.h>
void main(){
int i,a[100],n;
printf("Enter the no of elements of 1D array:	");
scanf("%d",&n);
printf("Enter the %d elements of the array",n);
for(i = 0; i<n;i++)
{
	scanf("%d",&a[i]);
}
}
 
PREVIOUS NEXT
Tagged: #C #program #create #array
ADD COMMENT
Topic
Name
9+5 =