Multiple choice technology web technology

how do u read the passed arguments to a windows bat file inside that bat file?

  1. using $ARGS[0] , $ARGS[1] etc
  2. using $1 , $2 etc
  3. using $_[0] , $_[1] etc
  4. using %1, %2 etc

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

In Windows batch files, arguments are accessed using %1, %2, %3, etc. The syntax $ARGS, $1, \$2 is from PowerShell. $[0], $[1] is Perl array syntax for function parameters. Each argument is referenced by its position with the percent sign prefix.