Teoh
2013-01-15 04:37:12 UTC
Given: float a[8]= {15.0, 11.0, 7.0, 3.5, 7.6, -3.5, 8.0, 9.9};
int b=4;
i. printf(“%.2f\n”, a[b * b]);
=invalid
ii. printf(“%.2f\n”, a[b]+b);
=valid
iii. a[2*b-3]=a[b/2];
=valid
help me check my answer.
can help me explain why invalid?
thank.