Given the C code fragment below: int h = 0; /* line 1 */ int g() {
Fantastic news! We've Found the answer you've been seeking!
Question:
- Given the C code fragment below:
int h = 0; /* line 1 */
int g() { h = h + 1; return h; } /* line 2 */
int main() { /* line 3 */
int B[4] = { 7, 13, 19, 23 }; /* line 4 */
B[ g() ] = B[ g()] + B[ g() ]; /* line 5 */
} /* line 6 */
Describe what should happen when line 5 is executed. What should be the final values of the B array and the variable h?
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date: