Node.js Online Quiz


Advertisements


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.

Answer : A

Explanation

Callback is an asynchronous equivalent for a function.

Answer : C

Explanation

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

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

fs.ftruncate(fd, len, callback) is the method which is used to truncate a file.

Answer : B

Explanation

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

Answer : A

Explanation

path.normalize(p) normalizes a string path, taking care of '..' and '.' parts.

Q 8 - net.isIP(input) tests if input is an IP address or not.

A - true

B - false

Answer : A

Explanation

net.isIP(input) tests if input is an IP address. Returns 0 for invalid strings, returns 4 for IP version 4 addresses, and returns 6 for IP version 6 addresses.

Q 9 - Can we create child processes in Node applications.

A - true

B - false

Answer : A

Explanation

Node facilitates creation of child processes to leverage parallel processing on multi-core cpu based systems.

Q 10 - Duplex stream can be used for both read and write operation.

A - true

B - false

Answer : A

Explanation

Duplex stream can be used for both read and write operation.


nodejs_questions_answers.htm

Advertisements