ITPEC FE Morning October 2018 Question 19
ITPEC FE Morning October 2018 — Question 19 of 80
Directory path navigation — trace a sequence of absolute and relative directory moves.
Given tree with full paths \A\A\A, \A\A\B, \A\B\A, ..., \B\B\B, find which move sequence ends at \B\A\B.
Path rules:
- Starts with \ → absolute (from Root)
- . → current directory
- .. → parent directory
- No prefix → treated as .\ (relative to current)
Trace option (a): `\A → ..\B → .\A\B`
- \A → current = \A
- ..\B → parent of \A = Root, then B → current = \B
- .\A\B → current is \B, then A\B → \B\A\B ✓
Why not others:
- (b) \B → .\B\A → ..\B ends at \B\B\B
- (c) \B → \A → \B — all absolute, ends at \B
- (d) \B\A → ..\B ends at \B\B
Key rule: . = stay in current dir, .. = go up one level, \ at start = absolute from Root.
AI-generated — may contain errors
The original exam layout is preserved in the image so diagrams, formulas, tables, and code remain accurate.
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.