Array:
Array is the collection of different values having same data type.
-We have a integer Array that having all integer values.
-Character array is known as String.
Size of Array:
Total elements*sizeof(one element)
Length of Array:
Formula:
length=sizeof(array)/sizeof(a[i])
-Here a[i] shows the one element of the array.
Example-
Array is {1,2,3,4,5}
Then sizeof(Array) is 20
and sizeof(int) is 4
then length is 20/4=5
program-
#include < stdio.h>
int main()
{
int a[6],b[100],c[500];
cout<<"Size of first array is "<
cout<<"Size of second array is "<
cout<<"Size of third array is "<
}
output-
Size of first array is 6
Size of second array is 100
Size of third array is 500