Question: If the child_process module methods are in scope, what is a current way to execute the command ps -ef using a child process?

  1. spawn("ps -ef")
  2. exec("ps -ef")
  3. exec("ps", "-ef")
  4. fork("ps -ef")

Answer: The correct answer of the above question is Option B:exec("ps -ef")