Login
Remember
Register
Ask a Question
Why is it necessary to give the size of an array in an array declaration in C Language?
0
votes
asked
Mar 17, 2020
in
C Plus Plus
by
rajeshsharma
Why is it necessary to give the size of an array in an array declaration in C Language?
#c-language-array-of-array
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Mar 17, 2020
by
Robindeniel
When an array is declared, the compiler allocates a base address and reserves enough space
in
memory for all the elements of the array. The size is required to allocate the required space and
hence size must be mentioned.
...