Bird
0
0

What does the $ symbol do in PowerShell when placed before a word like $name?

easy📝 Conceptual Q11 of 15
PowerShell - Variables and Data Types
What does the $ symbol do in PowerShell when placed before a word like $name?
AIt prints the word 'name' to the screen.
BIt creates a variable named 'name' to store data.
CIt comments out the line.
DIt runs a command called 'name'.
Step-by-Step Solution
Solution:
  1. Step 1: Understand the role of $ in PowerShell

    The $ symbol is used to declare or access variables in PowerShell.
  2. Step 2: Identify what $name means

    $name means a variable named 'name' that can hold data like text or numbers.
  3. Final Answer:

    It creates a variable named 'name' to store data. -> Option B
  4. Quick Check:

    $ before word = variable creation [OK]
Quick Trick: Remember: $ always starts a variable name [OK]
Common Mistakes:
  • Thinking $ runs commands
  • Confusing $ with comments
  • Assuming $ prints text directly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes