Bird
0
0

Which of the following is the correct syntax to multiply two numbers 5 and 3 in PowerShell?

easy📝 Syntax Q12 of 15
PowerShell - Operators
Which of the following is the correct syntax to multiply two numbers 5 and 3 in PowerShell?
AWrite-Output 5 & 3
BWrite-Output 5 * 3
CWrite-Output 5 multiply 3
DWrite-Output 5 x 3
Step-by-Step Solution
Solution:
  1. Step 1: Identify the multiplication operator in PowerShell

    PowerShell uses * for multiplication between numbers.
  2. Step 2: Check syntax correctness

    Write-Output 5 * 3 correctly multiplies 5 and 3 and outputs the result.
  3. Final Answer:

    Write-Output 5 * 3 -> Option B
  4. Quick Check:

    Multiplication uses * operator [OK]
Quick Trick: Use * for multiplication in PowerShell [OK]
Common Mistakes:
  • Using 'x' or 'multiply' instead of *
  • Using & which is a different operator
  • Missing spaces around operator causing errors

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes