Bird
0
0

Which Node.js method is used to create a child process that supports IPC?

easy📝 Syntax Q12 of 15
Node.js - Child Processes
Which Node.js method is used to create a child process that supports IPC?
Achild_process.spawn()
Bchild_process.exec()
Cchild_process.fork()
Dchild_process.execFile()
Step-by-Step Solution
Solution:
  1. Step 1: Review child process methods and identify the one enabling IPC

    spawn(), exec(), execFile() create processes but don't enable IPC by default. fork() creates a child process with an IPC channel for message passing.
  2. Final Answer:

    child_process.fork() -> Option C
  3. Quick Check:

    fork() creates IPC-enabled child process [OK]
Quick Trick: Use fork() for IPC between parent and child [OK]
Common Mistakes:
  • Using spawn() or exec() expecting IPC
  • Confusing execFile() with fork()
  • Not knowing fork() creates a special IPC channel

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Node.js Quizzes