Development - Node Js Test

Test Instructions :

1. The Test is 1hr duration.
2. The Test Paper consists of 30 questions. The maximum marks are 30.
3. All the questions are multiple choice question type with three options for each question.
4. Out of the three options given for each question, only one option is the correct answer.
5. Each question is allotted 1 mark for each correct response.
6. 0.25 will be deducted for incorrect response of each question.
Start Test

   Time Left : 00 : 30    : 00

Is the code below valid?

var cb0 = function (req, res, next) {
  console.log('CB0')
  next()
}

var cb1 = function (req, res, next) {
  console.log('CB1')
  next()
}

app.get('/example/d', [cb0, cb1], function (req, res, next) {
  console.log('the response will be sent by the next function ...')
  next()
}, function (req, res) {
  res.send('Hello from D!')
})

 

  

  

Which of the following is true about setInterval(cb, ms) global function?

  

  

  

  

Which method of fs module is used to close a file?

  

  

  

  

Which of the following is true about package.json?

  

  

  

  

Which of the following code converts a buffer buf to JSON object?

  

  

  

  

Which of the following is true about setTimeout(cb, ms) global function?

  

  

  

  

Which of the following is true about readable stream?

  

  

  

  

Is process a global object?

  

  

In Node.js from the following which is true about writable stream

  

  

  

  

package.json is is used to define the properties of a package?

  

  

Which of the following module is required to create a web server?

  

  

  

  

Which of the following is true with respect to Node.

  

  

  

  

Which of the following statement is valid to use a Node module http in a Node based application?

  

  

  

  

How can we create chainable route handlers for a route path in ExpressJS app?

  

  

  

Which of the following is true about Chaining streams ?

  

  

  

  

Node.js runs on __________

  

  

  

  

Node.js' package ecosystem, npm, is the largest ecosystem of open source libraries in the world. ?

  

  

Which of the following code gets length of a buffer buf?

  

  

  

  

Which of the following is true about fs module of Node?

  

  

  

  

REPL stands for.

  

  

  

  

Is Node.js free to use?

  

  

Which method of fs module is used to delete a file?

  

  

  

  

A stream fires finish event when all data has been flushed to underlying system.?

  

  

What npm stands for?

  

  

  

  

Which of following command starts a REPL session?

  

  

  

  

Which of the following is the correct way to get a normalized path?

  

  

  

  

Which of the following statement is valid to use a Node module fs in a Node based application?

  

  

  

  

Which of the following code prints current directory?

  

  

  

  

To install Node.js express module

  

  

  

  

Which of the following module is required to create a child process?

  

  

  

  

Route paths, in combination with a request method, define the endpoints at which requests can be made.Which of following are valid form of route path?

  

  

  

  

Is console a global object?

  

  

What are the key features of Node.js ?

  

  

  

  

Which of the following is true about EventEmitter.on property?

  

  

  

  

What is Node.JS?

  

  

  

  

How can we create instance of http module ?

  

  

  

  

Which of the following module is required for exception handling in Node?

  

  

  

  

Which of the following code prints process version?

  

  

  

  

Which of the following module is required to create a web server?

  

  

  

  

Which of the following is true about internal binding with respect to domain module?

  

  

  

  

Which of the following command will show version of npm?

  

  

  

  

How to store local variables that can be access within the application?

  

  

  

  

Node.js supports which of the following platform?

  

  

  

  

Node.js uses an event-driven, non-blocking I/O model ?

  

  

Node.js is ________ by default.

  

  

  

  

Node js is a single threaded application but supports concurrency.

  

  

A stream fires error event when there is any error receiving or writing data.

  

  

The $ npm ls statement is used to list down all the locally installed module?

  

  

In Nodejs how node based web servers differ from traditional web servers ?

  

  

  

  

The $ npm ls -g statement is used to list down all the locally installed module?

  

  

All APIs of Node.JS are

  

  

  

  

Which statement execute the code of sample.js file?

  

  

  

  

net.isIP(input) returns 4 for IP version 4 addresses.

  

  

Which of the following is true about fork methd of child_process module. ?

  

  

  

  

Transform stream is a type of duplex stream.

  

  

In Nodejs what is use of underscore variable in REPL session?

  

  

  

  

Where is captured values are populated regarding route parameters?

  

  

  

  

Which of the following code print the name of operating system?

  

  

  

  

In ExpressJS, the method app.all(path, callback [, callback ...]) can accept all HTTP methods

  

  

How many number of callback functions can be attached to handle a request?

  

  

Is the below code valid?

var cb0 = function (req, res, next) {
  console.log('CB0')
  next()
}

var cb1 = function (req, res, next) {
  console.log('CB1')
  next()
}

var cb2 = function (req, res) {
  res.send('Hello from C!')
}

app.get('/example/c', [cb0, cb1, cb2])

 

  

  

How can we check the cujrrent version of NPM?

  

  

  

  

Note:
  • Click the 'Submit Test' button given in the bottom of this page to Submit your answers.
  • Test will be submitted automatically if the time expired.
  • Don't refresh the page.