Bird
0
0

What is the output of this PowerShell command?

medium📝 Command Output Q4 of 15
PowerShell - Operators
What is the output of this PowerShell command?
5..3
A5 4 3
B3 4 5
CError: Invalid range
D5 3
Step-by-Step Solution
Solution:
  1. Step 1: Understand range operator with descending numbers

    When the first number is greater than the second, the range operator creates a descending sequence.
  2. Step 2: Apply to 5..3

    The sequence is 5, 4, 3.
  3. Final Answer:

    5 4 3 -> Option A
  4. Quick Check:

    Descending range outputs numbers downwards [OK]
Quick Trick: Range operator counts down if first number is bigger [OK]
Common Mistakes:
  • Expecting an error for descending range
  • Assuming it always counts up
  • Confusing output with just start and end numbers

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes