Why will the following array definition fail to reserve storage? float weights[]; The following array definition will
Fantastic news! We've Found the answer you've been seeking!
Question:
Why will the following array definition fail to reserve storage? float weights[]; The following array definition will fail to reserve storage because it hasn't been assigned a number of arrav elements, so for it to be successful it should look like: float weight[8]:
Sol158:
Just a minor correction: the array definition should include square brackets, not a colon, to specify the number of elements. So it should look like: float weights[];
should be changed to float weights[8];
in order to reserve storage for 8 elements.
Posted Date: