• 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 : A

Explanation

All APIs of Node.js library are aynchronous that is non-blocking.

Answer : A

Explanation

npm stands for Node Package Manager.

Answer : D

Explanation

Node js is a single threaded application but it support concurrency via concept of event and callbacks. As every API of Node js are asynchronous and being a single thread, it uses async function calls to maintain the concurrency. Node uses observer pattern. Node thread keeps an event loop and whenever any task get completed, it fires the corresponding event which signals the event listener function to get executed.

Answer : D

Explanation

fs.read(fd, buffer, offset, length, position, callback) is the method which is used to read a file.

Answer : C

Explanation

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

Answer : A

Explanation

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

Answer : A

Explanation

os.freemem() returns the free amount of system memory in bytes.

Answer : C

Explanation

dns.lookup(hostname[, options], callback) resolves a hostname (e.g. 'google.com') into the first found A (IPv4) or AAAA (IPv6) record. options can be an object or integer. If options is not provided, then IP v4 and v6 addresses are both valid. If options is an integer, then it must be 4 or 6.

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.

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