ITPEC IP October 2025 Question 18

Source exam: ITPEC IP October 2025Topic: Software

ITPEC IP October 2025 — Question 18 of 100

The correct relative path is option (b)../D/E/img.jpg moves from B to its parent A, then descends through D to E.

The HTML document's current directory is B. The prefix .. moves one level upward to A. From A, directory D is a child and E is a child of D, so appending D/E/img.jpg reaches the target file.

Answer (b)

Why not others:
- (a) moves to A and then incorrectly looks for another child A beneath it

- (c) starts in B and looks for a child A, which does not exist

- (d) starts in B and looks for a child D, but D is B's sibling

Key rule: Resolve relative paths step by step from the current directory: .. selects the parent, while ordinary names select children.

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.