nerdexam
CompTIA

220-1002 · Question #607

Given the following batch file: Which of the following describes the purpose of the line beginning with rem?

The correct answer is A. Comment. In Windows batch scripting, the REM command (short for 'remark') is used to insert a comment line. Any text following REM on the same line is completely ignored by the command interpreter and is not executed. Comments are used to document the purpose of the script, describe…

Hardware and network troubleshooting

Question

Given the following batch file:

Which of the following describes the purpose of the line beginning with rem?

Exhibit

220-1002 question #607 exhibit

Options

  • AComment
  • BLoop
  • CVariable
  • DString

How the community answered

(43 responses)
  • A
    86% (37)
  • B
    5% (2)
  • C
    2% (1)
  • D
    7% (3)

Explanation

In Windows batch scripting, the REM command (short for 'remark') is used to insert a comment line. Any text following REM on the same line is completely ignored by the command interpreter and is not executed. Comments are used to document the purpose of the script, describe what specific sections do, or temporarily disable commands during troubleshooting. This is equivalent to the # character in shell scripts or // in many programming languages. REM lines have no effect on program logic, loops, variables, or string operations, making the other answer choices incorrect.

Topics

#batch file#rem comment#scripting syntax#Windows scripting

Community Discussion

No community discussion yet for this question.

Full 220-1002 Practice