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 : B

Explanation

Node based server uses a single threaded model and can services much larger number of requests than traditional server like Apache HTTP Server.

Answer : A

Explanation

npm stands for Node Package Manager.

Answer : C

Explanation

emit property is used to fire an event.

Answer : C

Explanation

Every method in fs module have synchronous as well as asynchronous form. Asynchronous methods of fs module take last parameter as completion function callback and first parameter of the callback function as error.

Answer : C

Explanation

Node.js global objects are global in nature and they are available in all modules. We do not need to include these objects in our application, rather we can use them directly.

Answer : B

Explanation

process.version can be used to get the current process version.

Q 7 - Which of the following module is required for network specific operations?

A - os module

B - fs module

C - net module

D - None of the above.

Answer : C

Explanation

Node.js net module is used to create both servers and clients. This module provides an aynchronous network wrapper.

Q 8 - Which of the following method resolves an ip address to an array of hostnames?

A - dns.reverse(ip, callback)

B - dns.resolve(hostname[, rrtype], callback)

C - dns.resolve4(hostname, callback)

D - None of the above.

Answer : A

Explanation

dns.reverse(ip, callback) resolves an ip address to an array of hostnames.

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.

Answer : C

Explanation

Webservices based on REST Architecture are known as RESTful web services. These webservices uses HTTP methods to implement the concept of REST architecture.

nodejs_questions_answers.htm
Advertisements