reference-en icon indicating copy to clipboard operation
reference-en copied to clipboard

Misleading example in "array" reference page

Open PrismSync opened this issue 4 years ago • 1 comments

On the reference page for the datatype "array", an example of initialization was shown as the following:

notice that in line 3, the array was declared to be of 6 elements, yet only 5 elements are present in the { }initialization part. We understand that in reality the last element will be initialized as zero by default, but with the context, I'm afraid this might be understood as that the declared size number of an array should be 1 more than the number of elements (as that for char array)

reference page for array image

PrismSync avatar Jan 29 '21 18:01 PrismSync

Oh, you are correct , I agree with you.

mohammedhemed77 avatar Feb 19 '21 11:02 mohammedhemed77