Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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]);
}
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #array
ADD COMMENT
Topic
Name
6+6 =