+ 6
what is the base type of an array?
4 Antworten
+ 11
Well the base type means the type of array.
eg int x;
this way you create a variable 'x' of type integer.
Further if you write int arr[10]; this means the array will be of integer type, each block of the array will occupy 2 bytes then, so here the base type is integer.
Means the data type is the base type of the array
+ 4
type of elements of an array is the base type of that array
+ 1
In your program you have to declare to which base type your array belongs : int,float or char etc.
if you write
char a[20];
Then it means all elements of the array are characters.So base type is char.
+ 1
The array defined by T array[] has type T[]. Basically it is a constant pointer.