Multiple choice technology programming languages

What is the output of the below command? a=2;(a=3; echo -n $a) ; echo -n $a

  1. 33

  2. 22

  3. 32

  4. none

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

The command executes (a=3; echo -n \$a) in a subshell, which outputs 3 but does not affect the variable a in the parent shell. The final echo -n \$a outputs the parent shell's value, which is 2, resulting in 32.