• Node.js Video Tutorials

Node.js Online Quiz



Following quiz provides Multiple Choice Questions (MCQs) related to Node.js Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Questions and Answers

Answer : C

Explanation

Being built on Google Chrome's V8 JavaScript Engine, Node.js library is very fast in code execution.

Q 2 - Which of the following command will show all the modules installed locally.

A - $ npm ls -g

B - $ npm ls

C - $ node ls -g

D - $ node ls

Answer : B

Explanation

Executing $ npm ls command will show all the modules installed locally.

Answer : C

Explanation

Writable stream is used for write operation and it can take output of readable stream as input.

Answer : B

Explanation

fs.stat(path, callback) is the method which is used to get information about a file.

Answer : B

Explanation

fs.rmdir(path, callback) is the method which is used to remove a directory.

Answer : A

Explanation

process.memoryUsage() can be used to get the memory usage.

Answer : A

Explanation

net.createServer([options][, connectionListener]) creates a new TCP server. The connectionListener argument is automatically set as a listener for the 'connection' event.

Q 8 - Which of the following module is required for DNS specific operations?

A - dns module

B - web module

C - net module

D - None of the above.

Answer : A

Explanation

Node.js dns module is used to do actual DNS lookup as well as to use underlying operating system name resolution functionalities.

Q 9 - Which of the following module is required to create a child process?

A - process module

B - child_process module

C - child module

D - web module

Answer : B

Explanation

Node provides child_process module which provides ways to create child process.

Q 10 - Child processes always have three streams child.stdin, child.stdout, and child.stderr which may be shared with the stdio streams of the parent process.

A - true

B - false

Answer : A

Explanation

Child processes always have three streams child.stdin, child.stdout, and child.stderr which may be shared with the stdio streams of the parent process.

nodejs_questions_answers.htm
Advertisements