4 ms·
From question 9: "What is the output of this program on an implementation where int occupies 2 bytes?" Question 12 is a function pointer question and doesn't
by X-Istence 15y ago
From question 9:
"What is the output of this program on an implementation where int occupies 2 bytes?"
Question 12 is a function pointer question and doesn't say anything about ints at all.
I'll assume you meant Question 14:
"What is the output of this program on an implementation where int and all pointer types occupy 2 bytes?"
If you read the question you would have noticed that the assumption was put in writing so that even if you first assumed int was 4 bytes, or pointers were 4 bytes you would still be able to find the answer correctly.
- psykotic 15y agoAh, I had clicked through to the original article which does not contain those caveats. Yes, I meant question 14, not 12.