Arrays in C Language:- Array is the collection of similar type of element. Declaration of Array in C Programming:- data type ARRAY ...
Arrays in C Language:-Array is the collection of similar type of element.
Declaration of Array in C Programming:-
Array index always start from 0 to n-1.Array can be access randomly.Size is always numeric.
Sample program of Array:-
Q)Write a program to create array and print it.
Declaration of Array in C Programming:-
data type ARRAY NAME[Size of Array]
Example:-char arr[30];
Array index always start from 0 to n-1.Array can be access randomly.Size is always numeric.
Sample program of Array:-
Q)Write a program to create array and print it.
P:void main()
{
int arr[30];
printf("Enter array");
for(i=0;i<20;i++)
scanf("%d",&arr[i]);
printf("Array is-");
for(i=0;i<20;i++)
printf("%d",arr[i]);
getch();
}
If you have any query then leave your comments and don't forgot to follow me on Google+,Facebook,Twitter.
COMMENTS