Which of the following commands is used to display your working directory?

  1. dir

  2. prompt \$p\$g

  3. pwd

  4. path


Correct Option: C

AI Explanation

To answer this question, you need to understand the commands used to display the working directory in different operating systems. Let's go through each option to understand why it is correct or incorrect:

Option A) dir - This option is incorrect because the "dir" command is used in Windows command prompt to list the files and directories in the current directory, not to display the working directory.

Option B) prompt \$p\$g - This option is incorrect because the "prompt \$p\$g" command is used in the Windows command prompt to customize the prompt text, not to display the working directory.

Option C) pwd - This option is correct because the "pwd" command is used in Unix-based operating systems (such as Linux, macOS) and some command-line interfaces to display the working directory.

Option D) path - This option is incorrect because the "path" command is used in Windows command prompt to display or set the command search path, not to display the working directory.

The correct answer is Option C) pwd. This option is correct because the "pwd" command is used to display the working directory in Unix-based operating systems.

Please select the most appropriate option.

Find more quizzes: