Difficulty: Easy
Correct Answer: COM, EXE, BAT
Explanation:
Introduction / Context:
Command resolution is the process the shell uses to find and start the program you request. DOS’s COMMAND.COM follows a consistent search order for extensions when none is specified at the prompt, which affects which file actually runs if multiple variants exist.
Given Data / Assumptions:
Concept / Approach:
COMMAND.COM first looks for a .COM file, then for a .EXE file, and finally for a .BAT file. This means a tiny .COM utility can shadow an .EXE or .BAT with the same name, leading to different behavior than expected.
Step-by-Step Solution:
User types FOO at the prompt.COMMAND.COM checks for FOO.COM; if present, it runs.If not found, it checks for FOO.EXE; if present, it runs.If neither is found, it checks for FOO.BAT and runs it if available.
Verification / Alternative check:
Create FOO.COM, FOO.EXE, and FOO.BAT in the same directory with distinctive output. Typing FOO will execute FOO.COM first, verifying the order COM → EXE → BAT.
Why Other Options Are Wrong:
Options A, B, and D list orders that contradict DOS’s documented behavior.Option E is incorrect because there is a definitive, standard order.
Common Pitfalls:
Final Answer:
COM, EXE, BAT
Discussion & Comments