Difficulty: Medium
Correct Answer: 2, 4, 4
Explanation:
Introduction / Context:The task is to bind qualifiers correctly and recall that in Turbo C, near pointers are 2 bytes while far/huge pointers are 4 bytes. sizeof returns the storage size of the pointer variable itself.
Given Data / Assumptions:
Concept / Approach:Read from the identifier outwards. The outermost qualifier adjacent to ptr1/ptr2/ptr3 governs their sizes.
Step-by-Step Solution:1) ptr1 is a near pointer ⇒ sizeof = 2.2) ptr2 is a far pointer ⇒ sizeof = 4.3) ptr3 is a huge pointer ⇒ sizeof = 4.4) Output: 2, 4, 4.
Verification / Alternative check:Isolate the declarations and print sizeof individually; results will match.
Why Other Options Are Wrong:Option A/D: Introduce an 8-byte size which Turbo C does not use for these pointers.Option B: Treats near as 4 bytes, which is incorrect.
Common Pitfalls:Assuming inner levels affect the outermost pointer size for sizeof; they do not.
Final Answer:2, 4, 4
Discussion & Comments