Bird
0
0

What will be the output of this PowerShell command?

medium📝 Command Output Q13 of 15
PowerShell - Basics and Environment
What will be the output of this PowerShell command?
Write-Output (5 + 3)
A8
B5 + 3
C(5 + 3)
DWrite-Output (5 + 3)
Step-by-Step Solution
Solution:
  1. Step 1: Understand expression evaluation in Write-Output

    Parentheses cause the expression inside to be evaluated before output.
  2. Step 2: Calculate the expression (5 + 3)

    5 + 3 equals 8, so Write-Output prints 8.
  3. Final Answer:

    8 -> Option A
  4. Quick Check:

    Write-Output evaluates expressions = A [OK]
Quick Trick: Parentheses evaluate expressions before printing [OK]
Common Mistakes:
  • Thinking it prints the expression as text
  • Confusing output with command text
  • Ignoring parentheses effect on evaluation

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes