in C Plus Plus by (23.9k points)
Why is it necessary to give the size of an array in an array declaration in C Language?

1 Answer

0 votes
by (20.8k points)
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.

Related questions

0 votes
asked Mar 17, 2020 in C Plus Plus by rajeshsharma (23.9k points)
0 votes
asked Jun 11, 2020 in C Plus Plus by Robindeniel (20.8k points)
0 votes
asked Mar 12, 2020 in C Plus Plus by rahuljain1 (6.5k points)
...