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

It is not advisable to use Node.js for CPU intensive applications.

Q 2 - By default, npm installs any dependency in the global mode.

A - true

B - false

Answer : B

Explanation

By default, npm installs any dependency in the local mode.

Q 3 - Which of the following provides in-built events.

A - events

B - callback

C - throw

D - handler

Answer : A

Explanation

Node has multiple in-built events available through events module.

Answer : A

Explanation

fs.close(fd, callback) is the method which is used to close a file.

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) returns 4 for IP version 4 addresses.

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.

Answer : A

Explanation

REST stands for REpresentational State Transfer.

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