Difficulty: Medium
Correct Answer: 65519 65521
Explanation:
Introduction / Context: This problem focuses on how argv is laid out in memory: it is an array of pointers (char). Taking &argv[i] yields the address of the i-th pointer object within that array. Consecutive pointer objects are stored contiguously, so their addresses differ by sizeof(char).
Given Data / Assumptions:
Concept / Approach: Since argv is an array of pointers, &argv[i+1] = &argv[i] + 1 * sizeof(char*). With sizeof(char*) = 2, each subsequent address increases by 2.
Step-by-Step Solution:
&argv[1] = 65517 (given).&argv[2] = 65517 + 2 = 65519.&argv[3] = 65519 + 2 = 65521.Verification / Alternative check: On systems with 4-byte pointers, the increments would be +4 instead; the question fixes the first value to imply a 2-byte stride.
Why Other Options Are Wrong:
Common Pitfalls: Confusing &argv[i] (address of the pointer element) with argv[i] (address of the string). These are different layers.
Final Answer: 65519 65521
Discussion & Comments