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 - Buffer class is a global class and can be accessed in application without importing buffer module.

A - true

B - false

Answer : A

Explanation

Buffer class is a global class and can be accessed in application without importing buffer module.

Answer : D

Explanation

fs.read(fd, buffer, offset, length, position, callback) is the method which is used to read 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

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

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.

Answer : D

Explanation

child_process.exec method runs a command in a shell and buffers the output. It returns a buffer with a max size and waits for the process to end and tries to return all the buffered data at once.

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