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…
Question
Given the following batch file:
Which of the following describes the purpose of the line beginning with rem?
Exhibit
Options
- AComment
- BLoop
- CVariable
- DString
How the community answered
(43 responses)- A86% (37)
- B5% (2)
- C2% (1)
- D7% (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
Community Discussion
No community discussion yet for this question.
