ITPEC IP April 2022 Question 22

Source exam: ITPEC IP April 2022Topic: Software

ITPEC IP April 2022 — Question 22 of 100

The relative path must move to the parent and then into d2. The resulting path is ../d2/f2.html. The current directory is d1. First, .. moves one level upward from d1 to their common parent, root. From there, d2/f2.html descends into directory d2 and selects the target file.

Answer (c)

Why not others:
- (a) ./d2/f2.html looks for d2 inside the current d1 directory

- (b) ./f2.html looks for f2.html directly inside d1

- (d) starts by looking for d2 below d1 and then moves within that nonexistent route

Key rule: In a relative path, . denotes the current directory and .. denotes its parent; sibling directories are reached by moving up once and then down into the sibling.

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 IP past-paper collection or Report an issue.