ITPEC IP April 2023 Question 20

Topic: SoftwareAlso asked in Spring 2021

Which of the following is an appropriate combination of the terms and explanations A through D concerning the file system of a hierarchical directory structure?

A:It is the directory at the topmost level of the hierarchy.B:It shows all paths starting from the topmost directory of the hierarchy down to the target file or directory according to the directory structure.C:It is the directory that is being manipulated now.D:It shows all paths starting from the directory that is manipulated now through the target file or directory according to the directory structure.
OptionCurrent directoryAbsolute pathRoot directory

Explanation

Current directory C, absolute path B, root directory A — the root is the top, an absolute path starts from it, and a relative path starts from the current directory.

  • •A, the topmost directory of the hierarchy: the root directory
  • •B, the path from the topmost directory to the target: an absolute path
  • •C, the directory now being worked in: the current directory
  • •D, the path from the current directory to the target: a relative path, which is not one of the three columns

Answer (c)

Why not others:

  • •(a) A, B, C — swaps the current directory and the root directory
  • •(b) A, D, C — swaps current and root, and gives the absolute path the description of a relative path
  • •(d) C, D, A — gives the absolute path D, which starts from the current directory and is therefore a relative path

Key rule: An absolute path is the same wherever you are, because it starts at the root; a relative path depends on the current directory it starts from.

Software · AI-written, may contain errors

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.