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
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.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
