IPA FE Subject A sample Question 18

Topic: Software

A question IPA Japan published in 基本情報技術者試験 科目A サンプル問題 問18, translated into English. ITPEC is based on the same exams.

Same question on ITPEC: Oct 2019 Q19

Which of the following is an explanation of an absolute path name in a file system?

Explanation

The path from the root directory to the target file — an absolute path lists every directory from the top of the tree, so it means the same file wherever you start.

On Unix an absolute path begins with the root, as in /home/user/docs/report.txt. A relative path such as docs/report.txt or ../docs/report.txt starts from the current directory, so its meaning changes when the current directory changes.

Answer (c)

Why not others:

  • •(a) — a path from the current directory is a relative path
  • •(b) — the home directory is itself a directory below the root and differs per user, so a path from it still depends on a starting point
  • •(d) — the length of a path plays no part in the definition; an absolute path is fixed by where it starts, the root

Key rule: Absolute paths start at the root and are the same from anywhere; relative paths start at the current directory, where . is the current and .. the parent directory.

Software · AI-written, may contain errors

This question comes from the past questions IPA Japan publishes, translated into English by ITPEC Practice. ITPEC Practice is an independent study tool and is not affiliated with IPA or ITPEC. See the original paper (PDF) or Report an issue.