Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

Which of the following provides in-built events?

Answer»

Which of the FOLLOWING PROVIDES in-built events?
CHOOSE answer from below list
(1)THROW
(2)handler
(3)callback
(4)events

Answer:-(4)events

2.

Which of the following is true about Piping streams?

Answer»

Which of the following is TRUE about Piping streams?
Choose the correct option from below list
(1)All the options
(2)Piping is a mechanism where we provide the output of one stream as the input to ANOTHER stream
(3)None of the options
(4)There is no limit on piping operations
(5)Piping is USED to GET data from one stream and to pass the output of that stream to another stream

Answer:-(1)All the options

3.

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

Answer»

Which of the following is true about EventEmitter.emit property?
CHOOSE the correct option from below lists
(1)It is used to locate an event handler
(2)It is used to BIND a function with the event
(3)It is used to fire an event
(4)NONE of the options
Answer:-(3)It is used to fire an event

4.

Node.js is a single threaded application but supports concurrency.

Answer»

Node.js is a single threaded application but supports concurrency.
CHOOSE the CORRECT OPTION from below list
(1)FALSE
(2)True
Answer:-(2)True

5.

Each type of Stream is an EventEmitter

Answer»

Each type of STREAM is an EVENTEMITTER
Choose the correct option from below list
(1)False
(2)TRUE
Answer:-(2)True

6.

How are node based web servers different from traditional web servers?

Answer»

How are node based WEB servers DIFFERENT from traditional web servers?
(1)There is no much difference between the two
(2)Node-based server processes request much faster than a traditional server
(3)Node-based server uses a single threaded model and can service a much larger number of requests than traditional server like Apache HTTP Server
(4)None of the options

Answer:-(3)Node-based server uses a single threaded model and can service a much larger number of requests than traditional server like Apache HTTP Server

7.

A stream fires end event when there is no more data to read

Answer»

A stream fires end event when there is no more data to read
Choose the CORRECT option from below list
(1)True
(2)False

ANSWER:-(1)True

8.

Print the relative path of your script using the predefined global object _____________.

Answer» PRINT the RELATIVE path of your script USING the predefined global OBJECT _____________.
Please choose the correct option from below list
(1)console.log('filename')
(2)console.log(/filename)
(3)console.log( __dirname ); 9)
(4)console.log( __filename );

Answer:-(4)console.log( __filename );
9.

We can get an http module in a node based application using _______

Answer»

We can get an http module in a node based application USING _______
Choose the correct option from list
(1)package http;
(2)var http = REQUIRE("http");
(3)import http;
(4)var http = import("http");

ANSWER:-(2)var http = require("http");

10.

A stream fires a data event when there is data available to read

Answer»

A stream FIRES a data EVENT when there is data available to read
Choose the correct OPTION from below list
(1)True
(2)False

ANSWER:-(1)True

11.

What is the use of Underscore Variable in REPL session?

Answer»

What is the use of Underscore Variable in REPL session?
Choose CORRECT option from below list
(1)To STORE the result
(2)To get the last command used
(3)To get the last result
(4)NONE of the options

Answer:-(3)To get the last result

12.

Which of the following commands will show the version of the Node?

Answer»

Which of the following COMMANDS will SHOW the version of the Node?
Choose the CORRECT option from below LIST
(1)$ npm --version
(2)$ node getVersion
(3)$ node --version
(4)$ npm getVersion

Answer:-(3)$ node --version

13.

Which of the following codes can make a request to a web server?

Answer»

Which of the FOLLOWING codes can make a request to a web server?
Choose answer from below list
(1)http.request(OPTIONS, callback)
(2)http.createRequest(options, callback)
(3)http.makeRequest(options, callback)
(4)None of the options

Answer:-(1)http.request(options, callback)

14.

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

Answer»

Which method of fs MODULE is used to write a file?
Choose answer from below list
(1)fs.write(PATH, flags[, MODE], callback)
(2)fs.writeFile(path, flags[, mode], callback)
(3)None of the options.
(4)fs.writePath(path, flags[, mode], callback)

Answer:-(2)fs.writeFile(path, flags[, mode], callback)

15.

Which of the following is true about a writable stream?

Answer»

Which of the following is true about a writable stream?
(I) A writable stream is used for write operation.
(II) The OUTPUT of a readable stream can be the input to a writable stream.
Choose the CORRECT option from below list
(1)I & II
(2)None of the options
(3)I
(4)II

Answer:-(1)I & II

16.

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

Answer»

Which method of fs module is used to close a FILE?
CHOOSE the correct option from below LIST
(1)fs.closeFile(fd, callback)
(2)fs.close(fd, callback)
(3)fs.closePath(fd, callback)
(4)None of the options

Answer:-(2)fs.close(fd, callback)

17.

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

Answer»

Which method of fs module is used to TRUNCATE a file?
Choose ANSWER from below list
(1)fs.delete(FD, len, callback)
(2)fs.ftruncate(fd, len, callback)
(3)fs.remove(fd, len, callback)
(4)None of the options

Answer:-(2)fs.ftruncate(fd, len, callback)

18.

What is Node.js?

Answer»

What is Node.js?
Choose correct option from below list
(1)None of the OPTIONS
(2)Node.js is a Java-based FRAMEWORK
(3)Node.js is a web SERVER
(4)Node.js is a JAVASCRIPT-based framework/platform built on Google Chromes JavaScript V8 Engine

Answer:-(4)Node.js is a JavaScript-based framework/platform built on Google Chromes JavaScript V8 Engine

19.

Write down some difference between Django and Node.js

Answer» WRITE down some DIFFERENCE between DJANGO and Node.js
Below are the 7 most COMMON difference in between Django and Node.js
20.

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

Answer»

Which of the following is true about EventEmitter.on PROPERTY?
CHOOSE answer from below list
(1)NONE of the options
(2)It is used to fire an event
(3)It is used to locate an event HANDLER
(4)It is used to bind a function with the event

Answer:-(4)It is used to bind a function with the event

21.

REPL stands for ____________________.

Answer»

REPL STANDS for ____________________.
Please select the correct option from below list
(1)Research Eval Program LEARN
(2)Read Eval Print Loop
(3)Read EARN Point Learn
(4)Read Eval Point Loop

Answer:-(2)Read Eval Print Loop